diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-23 08:39:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-23 08:39:40 -0800 |
commit | d5dee39b27201f9f5460eca55efcc91a663b738c (patch) | |
tree | ba1b026b0b20439f962ee4621e33adcab1c7fc3a /drivers/input/mouse/elan_i2c_core.c | |
parent | 4cc4b9323f43458c9277e082f90316570431881e (diff) | |
parent | 6e11617fcff3688f70650a3e40addb0043dda137 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry:
- a new driver for Zeitech touchscreen controller
- a new driver for Samsung "touchkeys"
- touchscreen driver for Moorestown platform has been removed because
platform support is gone
- MPU3050 accelerometer driver was removed in favor of IIO driver
- miscellaneous driver cleanup and fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (88 commits)
Input: zet6223 - export OF device ID as module aliases
Input: tsc2004/5 - switch to using generic device properties
Input: tsc2004/5 - fix regulator handling
Input: tsc2005 - add OF device table
Input: add driver for Zeitec ZET6223
Input: joydev - do not report stale values on first open
Input: synaptics-rmi4 - forward upper mechanical buttons to PS/2 guest
Input: synaptics-rmi4 - clean up F30 implementation
Input: synaptics - use SERIO_OOB_DATA to handle trackstick buttons
Input: psmouse - add a custom serio protocol to send extra information
Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()
Input: xpad - restore LED state after device resume
Input: synaptics-rmi4 - add rmi_find_function()
Input: xpad - fix stuck mode button on Xbox One S pad
Input: joydev - use clamp() macro
Input: refuse to register absolute devices without absinfo
Input: synaptics-rmi4 - add sysfs interfaces for hardware IDs
Input: synaptics-rmi4 - add sysfs attribute update_fw_status
Input: mousedev - stop offering PS/2 to userspace by default
Input: tca8418 - switch to using generic device properties
...
Diffstat (limited to 'drivers/input/mouse/elan_i2c_core.c')
-rw-r--r-- | drivers/input/mouse/elan_i2c_core.c | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 1e1d0ad406f2..352050e9031d 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -1041,8 +1041,7 @@ static int elan_probe(struct i2c_client *client, return -EIO; } - data = devm_kzalloc(&client->dev, sizeof(struct elan_tp_data), - GFP_KERNEL); + data = devm_kzalloc(dev, sizeof(struct elan_tp_data), GFP_KERNEL); if (!data) return -ENOMEM; @@ -1053,29 +1052,25 @@ static int elan_probe(struct i2c_client *client, init_completion(&data->fw_completion); mutex_init(&data->sysfs_mutex); - data->vcc = devm_regulator_get(&client->dev, "vcc"); + data->vcc = devm_regulator_get(dev, "vcc"); if (IS_ERR(data->vcc)) { error = PTR_ERR(data->vcc); if (error != -EPROBE_DEFER) - dev_err(&client->dev, - "Failed to get 'vcc' regulator: %d\n", + dev_err(dev, "Failed to get 'vcc' regulator: %d\n", error); return error; } error = regulator_enable(data->vcc); if (error) { - dev_err(&client->dev, - "Failed to enable regulator: %d\n", error); + dev_err(dev, "Failed to enable regulator: %d\n", error); return error; } - error = devm_add_action(&client->dev, - elan_disable_regulator, data); + error = devm_add_action(dev, elan_disable_regulator, data); if (error) { regulator_disable(data->vcc); - dev_err(&client->dev, - "Failed to add disable regulator action: %d\n", + dev_err(dev, "Failed to add disable regulator action: %d\n", error); return error; } @@ -1093,14 +1088,14 @@ static int elan_probe(struct i2c_client *client, if (error) return error; - dev_info(&client->dev, + dev_info(dev, "Elan Touchpad: Module ID: 0x%04x, Firmware: 0x%04x, Sample: 0x%04x, IAP: 0x%04x\n", data->product_id, data->fw_version, data->sm_version, data->iap_version); - dev_dbg(&client->dev, + dev_dbg(dev, "Elan Touchpad Extra Information:\n" " Max ABS X,Y: %d,%d\n" " Width X,Y: %d,%d\n" @@ -1118,38 +1113,33 @@ static int elan_probe(struct i2c_client *client, * Systems using device tree should set up interrupt via DTS, * the rest will use the default falling edge interrupts. */ - irqflags = client->dev.of_node ? 0 : IRQF_TRIGGER_FALLING; + irqflags = dev->of_node ? 0 : IRQF_TRIGGER_FALLING; - error = devm_request_threaded_irq(&client->dev, client->irq, - NULL, elan_isr, + error = devm_request_threaded_irq(dev, client->irq, NULL, elan_isr, irqflags | IRQF_ONESHOT, client->name, data); if (error) { - dev_err(&client->dev, "cannot register irq=%d\n", client->irq); + dev_err(dev, "cannot register irq=%d\n", client->irq); return error; } - error = sysfs_create_groups(&client->dev.kobj, elan_sysfs_groups); + error = sysfs_create_groups(&dev->kobj, elan_sysfs_groups); if (error) { - dev_err(&client->dev, "failed to create sysfs attributes: %d\n", - error); + dev_err(dev, "failed to create sysfs attributes: %d\n", error); return error; } - error = devm_add_action(&client->dev, - elan_remove_sysfs_groups, data); + error = devm_add_action(dev, elan_remove_sysfs_groups, data); if (error) { elan_remove_sysfs_groups(data); - dev_err(&client->dev, - "Failed to add sysfs cleanup action: %d\n", + dev_err(dev, "Failed to add sysfs cleanup action: %d\n", error); return error; } error = input_register_device(data->input); if (error) { - dev_err(&client->dev, "failed to register input device: %d\n", - error); + dev_err(dev, "failed to register input device: %d\n", error); return error; } @@ -1157,8 +1147,8 @@ static int elan_probe(struct i2c_client *client, * Systems using device tree should set up wakeup via DTS, * the rest will configure device as wakeup source by default. */ - if (!client->dev.of_node) - device_init_wakeup(&client->dev, true); + if (!dev->of_node) + device_init_wakeup(dev, true); return 0; } |