summaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/cyapa.c16
-rw-r--r--drivers/input/mouse/elan_i2c_core.c20
-rw-r--r--drivers/input/mouse/synaptics.c2
3 files changed, 4 insertions, 34 deletions
diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c
index dfd3873513e4..c675f156948b 100644
--- a/drivers/input/mouse/cyapa.c
+++ b/drivers/input/mouse/cyapa.c
@@ -1238,13 +1238,6 @@ static const struct attribute_group cyapa_sysfs_group = {
.attrs = cyapa_sysfs_entries,
};
-static void cyapa_remove_sysfs_group(void *data)
-{
- struct cyapa *cyapa = data;
-
- sysfs_remove_group(&cyapa->client->dev.kobj, &cyapa_sysfs_group);
-}
-
static void cyapa_disable_regulator(void *data)
{
struct cyapa *cyapa = data;
@@ -1312,19 +1305,12 @@ static int cyapa_probe(struct i2c_client *client,
return error;
}
- error = sysfs_create_group(&dev->kobj, &cyapa_sysfs_group);
+ error = devm_device_add_group(dev, &cyapa_sysfs_group);
if (error) {
dev_err(dev, "failed to create sysfs entries: %d\n", error);
return error;
}
- error = devm_add_action(dev, cyapa_remove_sysfs_group, cyapa);
- if (error) {
- cyapa_remove_sysfs_group(cyapa);
- dev_err(dev, "failed to add sysfs cleanup action: %d\n", error);
- return error;
- }
-
error = cyapa_prepare_wakeup_controls(cyapa);
if (error) {
dev_err(dev, "failed to prepare wakeup controls: %d\n", error);
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index d9b103a81a79..8719da540383 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -1138,13 +1138,6 @@ static void elan_disable_regulator(void *_data)
regulator_disable(data->vcc);
}
-static void elan_remove_sysfs_groups(void *_data)
-{
- struct elan_tp_data *data = _data;
-
- sysfs_remove_groups(&data->client->dev.kobj, elan_sysfs_groups);
-}
-
static int elan_probe(struct i2c_client *client,
const struct i2c_device_id *dev_id)
{
@@ -1194,9 +1187,8 @@ static int elan_probe(struct i2c_client *client,
return error;
}
- error = devm_add_action(dev, elan_disable_regulator, data);
+ error = devm_add_action_or_reset(dev, elan_disable_regulator, data);
if (error) {
- regulator_disable(data->vcc);
dev_err(dev, "Failed to add disable regulator action: %d\n",
error);
return error;
@@ -1269,20 +1261,12 @@ static int elan_probe(struct i2c_client *client,
return error;
}
- error = sysfs_create_groups(&dev->kobj, elan_sysfs_groups);
+ 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 = devm_add_action(dev, elan_remove_sysfs_groups, data);
- if (error) {
- elan_remove_sysfs_groups(data);
- dev_err(dev, "Failed to add sysfs cleanup action: %d\n",
- error);
- return error;
- }
-
error = input_register_device(data->input);
if (error) {
dev_err(dev, "failed to register input device: %d\n", error);
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 46bbe99d6511..56fae3472114 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -193,7 +193,7 @@ static const char * const forcepad_pnp_ids[] = {
};
/*
- * Send a command to the synpatics touchpad by special commands
+ * Send a command to the synaptics touchpad by special commands
*/
static int synaptics_send_cmd(struct psmouse *psmouse, u8 cmd, u8 *param)
{