Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: touchscreen - drop unnecessary calls to device_init_wakeup

Calling device_init_wakeup in the remove function is unnecessary since the
device is going away, and thus won't be able to cause any wakeups under any
circumstances. Besides, the driver cleanup code already handles the
necessary cleanup.

Similarly, disabling wakeup in the probe error path is unnecessary, as is
disabling wakeup in the probe function in the first place.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Guenter Roeck and committed by
Dmitry Torokhov
8e1b4d83 56580c2c

-7
-2
drivers/input/touchscreen/ads7846.c
··· 1462 1462 { 1463 1463 struct ads7846 *ts = spi_get_drvdata(spi); 1464 1464 1465 - device_init_wakeup(&spi->dev, false); 1466 - 1467 1465 sysfs_remove_group(&spi->dev.kobj, &ads784x_attr_group); 1468 1466 1469 1467 ads7846_disable(ts);
-2
drivers/input/touchscreen/bu21013_ts.c
··· 637 637 638 638 kfree(bu21013_data); 639 639 640 - device_init_wakeup(&client->dev, false); 641 - 642 640 return 0; 643 641 } 644 642
-1
drivers/input/touchscreen/eeti_ts.c
··· 231 231 */ 232 232 eeti_ts_stop(priv); 233 233 234 - device_init_wakeup(&client->dev, 0); 235 234 return 0; 236 235 237 236 err3:
-1
drivers/input/touchscreen/lpc32xx_ts.c
··· 313 313 struct lpc32xx_tsc *tsc = platform_get_drvdata(pdev); 314 314 struct resource *res; 315 315 316 - device_init_wakeup(&pdev->dev, 0); 317 316 free_irq(tsc->irq, tsc); 318 317 319 318 input_unregister_device(tsc->dev);
-1
drivers/input/touchscreen/st1232.c
··· 237 237 { 238 238 struct st1232_ts_data *ts = i2c_get_clientdata(client); 239 239 240 - device_init_wakeup(&client->dev, 0); 241 240 st1232_ts_power(ts, false); 242 241 243 242 return 0;