Skip to content

Commit

Permalink
merge upstream 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vantu5z committed Dec 27, 2022
1 parent b951c96 commit 6cf431e
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 49 deletions.
7 changes: 1 addition & 6 deletions synaptics-led/mouse/elan_i2c_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,12 +1311,6 @@ static int elan_probe(struct i2c_client *client,
return error;
}

error = devm_device_add_groups(dev, elan_sysfs_groups);
if (error) {
dev_err(dev, "failed to create sysfs attributes: %d\n", error);
return error;
}

error = input_register_device(data->input);
if (error) {
dev_err(dev, "failed to register input device: %d\n", error);
Expand Down Expand Up @@ -1442,6 +1436,7 @@ static struct i2c_driver elan_driver = {
.acpi_match_table = ACPI_PTR(elan_acpi_id),
.of_match_table = of_match_ptr(elan_of_match),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.dev_groups = elan_sysfs_groups,
},
.probe = elan_probe,
.id_table = elan_id,
Expand Down
4 changes: 2 additions & 2 deletions synaptics-led/mouse/hgpk.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ static ssize_t hgpk_trigger_recal(struct psmouse *psmouse, void *data,

/*
* We queue work instead of doing recalibration right here
* to avoid adding locking to to hgpk_force_recalibrate()
* to avoid adding locking to hgpk_force_recalibrate()
* since workqueue provides serialization.
*/
psmouse_queue_work(psmouse, &priv->recalib_wq, 0);
Expand Down Expand Up @@ -1057,7 +1057,7 @@ void hgpk_module_init(void)
strlen(hgpk_mode_name));
if (hgpk_default_mode == HGPK_MODE_INVALID) {
hgpk_default_mode = HGPK_MODE_MOUSE;
strlcpy(hgpk_mode_name, hgpk_mode_names[HGPK_MODE_MOUSE],
strscpy(hgpk_mode_name, hgpk_mode_names[HGPK_MODE_MOUSE],
sizeof(hgpk_mode_name));
}
}
3 changes: 0 additions & 3 deletions synaptics-led/mouse/inport.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
* Inport (ATI XL and Microsoft) busmouse driver for Linux
*/

/*
*/

#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/init.h>
Expand Down
3 changes: 0 additions & 3 deletions synaptics-led/mouse/logibm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
* Logitech Bus Mouse Driver for Linux
*/

/*
*/

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/ioport.h>
Expand Down
3 changes: 0 additions & 3 deletions synaptics-led/mouse/pc110pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
* IBM PC110 touchpad driver for Linux
*/

/*
*/

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
Expand Down
22 changes: 4 additions & 18 deletions synaptics-led/mouse/psmouse-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ PSMOUSE_DEFINE_ATTR(resync_time, S_IWUSR | S_IRUGO,
(void *) offsetof(struct psmouse, resync_time),
psmouse_show_int_attr, psmouse_set_int_attr);

static struct attribute *psmouse_attributes[] = {
static struct attribute *psmouse_dev_attrs[] = {
&psmouse_attr_protocol.dattr.attr,
&psmouse_attr_rate.dattr.attr,
&psmouse_attr_resolution.dattr.attr,
Expand All @@ -103,9 +103,7 @@ static struct attribute *psmouse_attributes[] = {
NULL
};

static const struct attribute_group psmouse_attribute_group = {
.attrs = psmouse_attributes,
};
ATTRIBUTE_GROUPS(psmouse_dev);

/*
* psmouse_mutex protects all operations changing state of mouse
Expand Down Expand Up @@ -1481,8 +1479,6 @@ static void psmouse_disconnect(struct serio *serio)
struct psmouse *psmouse = serio_get_drvdata(serio);
struct psmouse *parent = NULL;

sysfs_remove_group(&serio->dev.kobj, &psmouse_attribute_group);

mutex_lock(&psmouse_mutex);

psmouse_set_state(psmouse, PSMOUSE_CMD_MODE);
Expand Down Expand Up @@ -1647,10 +1643,6 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
if (parent && parent->pt_activate)
parent->pt_activate(parent);

error = sysfs_create_group(&serio->dev.kobj, &psmouse_attribute_group);
if (error)
goto err_pt_deactivate;

/*
* PS/2 devices having SMBus companions should stay disabled
* on PS/2 side, in order to have SMBus part operable.
Expand All @@ -1666,13 +1658,6 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
mutex_unlock(&psmouse_mutex);
return retval;

err_pt_deactivate:
if (parent && parent->pt_deactivate)
parent->pt_deactivate(parent);
if (input_dev) {
input_unregister_device(input_dev);
input_dev = NULL; /* so we don't try to free it below */
}
err_protocol_disconnect:
if (psmouse->disconnect)
psmouse->disconnect(psmouse);
Expand Down Expand Up @@ -1791,7 +1776,8 @@ MODULE_DEVICE_TABLE(serio, psmouse_serio_ids);

static struct serio_driver psmouse_drv = {
.driver = {
.name = "psmouse",
.name = "psmouse",
.dev_groups = psmouse_dev_groups,
},
.description = DRIVER_DESC,
.id_table = psmouse_serio_ids,
Expand Down
3 changes: 0 additions & 3 deletions synaptics-led/mouse/sermouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
* Serial mouse driver for Linux
*/

/*
*/

#include <linux/delay.h>
#include <linux/module.h>
#include <linux/slab.h>
Expand Down
6 changes: 4 additions & 2 deletions synaptics-led/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ static const char * const smbus_pnp_ids[] = {
"LEN0099", /* X1 Extreme Gen 1 / P1 Gen 1 */
"LEN009b", /* T580 */
"LEN0402", /* X1 Extreme Gen 2 / P1 Gen 2 */
"LEN040f", /* P1 Gen 3 */
"LEN200f", /* T450s */
"LEN2044", /* L470 */
"LEN2054", /* E480 */
Expand All @@ -192,6 +193,7 @@ static const char * const smbus_pnp_ids[] = {
"SYN3221", /* HP 15-ay000 */
"SYN323d", /* HP Spectre X360 13-w013dx */
"SYN3257", /* HP Envy 13-ad105ng */
"SYN3286", /* HP Laptop 15-da3001TU */
NULL
};

Expand Down Expand Up @@ -715,8 +717,8 @@ static void synaptics_pt_create(struct psmouse *psmouse)
}

serio->id.type = SERIO_PS_PSTHRU;
strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->phys));
strscpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
strscpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->phys));
serio->write = synaptics_pt_write;
serio->start = synaptics_pt_start;
serio->stop = synaptics_pt_stop;
Expand Down
4 changes: 1 addition & 3 deletions synaptics-led/mouse/synaptics_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static int synaptics_i2c_probe(struct i2c_client *client,
return ret;
}

static int synaptics_i2c_remove(struct i2c_client *client)
static void synaptics_i2c_remove(struct i2c_client *client)
{
struct synaptics_i2c *touch = i2c_get_clientdata(client);

Expand All @@ -596,8 +596,6 @@ static int synaptics_i2c_remove(struct i2c_client *client)

input_unregister_device(touch->input);
kfree(touch);

return 0;
}

static int __maybe_unused synaptics_i2c_suspend(struct device *dev)
Expand Down
2 changes: 1 addition & 1 deletion synaptics-led/mouse/synaptics_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static int synusb_probe(struct usb_interface *intf,
synusb->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;

if (udev->manufacturer)
strlcpy(synusb->name, udev->manufacturer,
strscpy(synusb->name, udev->manufacturer,
sizeof(synusb->name));

if (udev->product) {
Expand Down
7 changes: 2 additions & 5 deletions synaptics-led/mouse/vsxxxaa.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
* Later on, I had access to the device's documentation (referenced below).
*/

/*
*/

/*
* Building an adaptor to DE9 / DB25 RS232
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -138,12 +135,12 @@ static void vsxxxaa_detection_done(struct vsxxxaa *mouse)
{
switch (mouse->type) {
case 0x02:
strlcpy(mouse->name, "DEC VSXXX-AA/-GA mouse",
strscpy(mouse->name, "DEC VSXXX-AA/-GA mouse",
sizeof(mouse->name));
break;

case 0x04:
strlcpy(mouse->name, "DEC VSXXX-AB digitizer",
strscpy(mouse->name, "DEC VSXXX-AB digitizer",
sizeof(mouse->name));
break;

Expand Down

0 comments on commit 6cf431e

Please sign in to comment.