diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/lm8323.c | 9 | ||||
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 5 | ||||
-rw-r--r-- | drivers/input/misc/kxtj9.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/mma8450.c | 8 | ||||
-rw-r--r-- | drivers/input/mouse/hgpk.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/ad7879.c | 4 |
7 files changed, 24 insertions, 6 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index ce281d152275..67df91af8424 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -483,7 +483,7 @@ static int gpio_keys_get_devtree_pdata(struct device *dev, | |||
483 | 483 | ||
484 | buttons = kzalloc(pdata->nbuttons * (sizeof *buttons), GFP_KERNEL); | 484 | buttons = kzalloc(pdata->nbuttons * (sizeof *buttons), GFP_KERNEL); |
485 | if (!buttons) | 485 | if (!buttons) |
486 | return -ENODEV; | 486 | return -ENOMEM; |
487 | 487 | ||
488 | pp = NULL; | 488 | pp = NULL; |
489 | i = 0; | 489 | i = 0; |
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index ab0acaf7fe8f..756348a7f93a 100644 --- a/drivers/input/keyboard/lm8323.c +++ b/drivers/input/keyboard/lm8323.c | |||
@@ -754,8 +754,11 @@ fail3: | |||
754 | device_remove_file(&client->dev, &dev_attr_disable_kp); | 754 | device_remove_file(&client->dev, &dev_attr_disable_kp); |
755 | fail2: | 755 | fail2: |
756 | while (--pwm >= 0) | 756 | while (--pwm >= 0) |
757 | if (lm->pwm[pwm].enabled) | 757 | if (lm->pwm[pwm].enabled) { |
758 | device_remove_file(lm->pwm[pwm].cdev.dev, | ||
759 | &dev_attr_time); | ||
758 | led_classdev_unregister(&lm->pwm[pwm].cdev); | 760 | led_classdev_unregister(&lm->pwm[pwm].cdev); |
761 | } | ||
759 | fail1: | 762 | fail1: |
760 | input_free_device(idev); | 763 | input_free_device(idev); |
761 | kfree(lm); | 764 | kfree(lm); |
@@ -775,8 +778,10 @@ static int __devexit lm8323_remove(struct i2c_client *client) | |||
775 | device_remove_file(&lm->client->dev, &dev_attr_disable_kp); | 778 | device_remove_file(&lm->client->dev, &dev_attr_disable_kp); |
776 | 779 | ||
777 | for (i = 0; i < 3; i++) | 780 | for (i = 0; i < 3; i++) |
778 | if (lm->pwm[i].enabled) | 781 | if (lm->pwm[i].enabled) { |
782 | device_remove_file(lm->pwm[i].cdev.dev, &dev_attr_time); | ||
779 | led_classdev_unregister(&lm->pwm[i].cdev); | 783 | led_classdev_unregister(&lm->pwm[i].cdev); |
784 | } | ||
780 | 785 | ||
781 | kfree(lm); | 786 | kfree(lm); |
782 | 787 | ||
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index da3828fc2c09..f270447ba951 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | ||
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/input.h> | 24 | #include <linux/input.h> |
24 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
@@ -37,7 +38,7 @@ | |||
37 | #define KBC_ROW_SCAN_DLY 5 | 38 | #define KBC_ROW_SCAN_DLY 5 |
38 | 39 | ||
39 | /* KBC uses a 32KHz clock so a cycle = 1/32Khz */ | 40 | /* KBC uses a 32KHz clock so a cycle = 1/32Khz */ |
40 | #define KBC_CYCLE_USEC 32 | 41 | #define KBC_CYCLE_MS 32 |
41 | 42 | ||
42 | /* KBC Registers */ | 43 | /* KBC Registers */ |
43 | 44 | ||
@@ -647,7 +648,7 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev) | |||
647 | debounce_cnt = min(pdata->debounce_cnt, KBC_MAX_DEBOUNCE_CNT); | 648 | debounce_cnt = min(pdata->debounce_cnt, KBC_MAX_DEBOUNCE_CNT); |
648 | scan_time_rows = (KBC_ROW_SCAN_TIME + debounce_cnt) * num_rows; | 649 | scan_time_rows = (KBC_ROW_SCAN_TIME + debounce_cnt) * num_rows; |
649 | kbc->repoll_dly = KBC_ROW_SCAN_DLY + scan_time_rows + pdata->repeat_cnt; | 650 | kbc->repoll_dly = KBC_ROW_SCAN_DLY + scan_time_rows + pdata->repeat_cnt; |
650 | kbc->repoll_dly = ((kbc->repoll_dly * KBC_CYCLE_USEC) + 999) / 1000; | 651 | kbc->repoll_dly = DIV_ROUND_UP(kbc->repoll_dly, KBC_CYCLE_MS); |
651 | 652 | ||
652 | input_dev->name = pdev->name; | 653 | input_dev->name = pdev->name; |
653 | input_dev->id.bustype = BUS_HOST; | 654 | input_dev->id.bustype = BUS_HOST; |
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index c456f63b6bae..783597a9a64a 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/module.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | #include <linux/input/kxtj9.h> | 26 | #include <linux/input/kxtj9.h> |
26 | #include <linux/input-polldev.h> | 27 | #include <linux/input-polldev.h> |
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c index 20f8f9284f02..6c76cf792991 100644 --- a/drivers/input/misc/mma8450.c +++ b/drivers/input/misc/mma8450.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/input-polldev.h> | 26 | #include <linux/input-polldev.h> |
27 | #include <linux/of_device.h> | ||
27 | 28 | ||
28 | #define MMA8450_DRV_NAME "mma8450" | 29 | #define MMA8450_DRV_NAME "mma8450" |
29 | 30 | ||
@@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = { | |||
229 | }; | 230 | }; |
230 | MODULE_DEVICE_TABLE(i2c, mma8450_id); | 231 | MODULE_DEVICE_TABLE(i2c, mma8450_id); |
231 | 232 | ||
233 | static const struct of_device_id mma8450_dt_ids[] = { | ||
234 | { .compatible = "fsl,mma8450", }, | ||
235 | { /* sentinel */ } | ||
236 | }; | ||
237 | MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids); | ||
238 | |||
232 | static struct i2c_driver mma8450_driver = { | 239 | static struct i2c_driver mma8450_driver = { |
233 | .driver = { | 240 | .driver = { |
234 | .name = MMA8450_DRV_NAME, | 241 | .name = MMA8450_DRV_NAME, |
235 | .owner = THIS_MODULE, | 242 | .owner = THIS_MODULE, |
243 | .of_match_table = mma8450_dt_ids, | ||
236 | }, | 244 | }, |
237 | .probe = mma8450_probe, | 245 | .probe = mma8450_probe, |
238 | .remove = __devexit_p(mma8450_remove), | 246 | .remove = __devexit_p(mma8450_remove), |
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c index 95577c15ae56..4d17d9f3320b 100644 --- a/drivers/input/mouse/hgpk.c +++ b/drivers/input/mouse/hgpk.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #define DEBUG | 32 | #define DEBUG |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/input.h> | 34 | #include <linux/input.h> |
35 | #include <linux/module.h> | ||
35 | #include <linux/serio.h> | 36 | #include <linux/serio.h> |
36 | #include <linux/libps2.h> | 37 | #include <linux/libps2.h> |
37 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index bc3b5187f3a3..131f9d1c921b 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c | |||
@@ -249,12 +249,14 @@ static void __ad7879_enable(struct ad7879 *ts) | |||
249 | 249 | ||
250 | static void __ad7879_disable(struct ad7879 *ts) | 250 | static void __ad7879_disable(struct ad7879 *ts) |
251 | { | 251 | { |
252 | u16 reg = (ts->cmd_crtl2 & ~AD7879_PM(-1)) | | ||
253 | AD7879_PM(AD7879_PM_SHUTDOWN); | ||
252 | disable_irq(ts->irq); | 254 | disable_irq(ts->irq); |
253 | 255 | ||
254 | if (del_timer_sync(&ts->timer)) | 256 | if (del_timer_sync(&ts->timer)) |
255 | ad7879_ts_event_release(ts); | 257 | ad7879_ts_event_release(ts); |
256 | 258 | ||
257 | ad7879_write(ts, AD7879_REG_CTRL2, AD7879_PM(AD7879_PM_SHUTDOWN)); | 259 | ad7879_write(ts, AD7879_REG_CTRL2, reg); |
258 | } | 260 | } |
259 | 261 | ||
260 | 262 | ||