Input: touchscreen - drop unnecessary calls to device_init_wakeup
authorGuenter Roeck <linux@roeck-us.net>
Sun, 22 Jan 2017 07:49:13 +0000 (23:49 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 22 Jan 2017 07:53:30 +0000 (23:53 -0800)
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>
drivers/input/touchscreen/ads7846.c
drivers/input/touchscreen/bu21013_ts.c
drivers/input/touchscreen/eeti_ts.c
drivers/input/touchscreen/lpc32xx_ts.c
drivers/input/touchscreen/st1232.c

index 1ce3ecbe37f89153e7b863fab92b7d8f05f6ef14..f5793e3d945f76d2b5e27e829c6441cf352e2b56 100644 (file)
@@ -1462,8 +1462,6 @@ static int ads7846_remove(struct spi_device *spi)
 {
        struct ads7846 *ts = spi_get_drvdata(spi);
 
-       device_init_wakeup(&spi->dev, false);
-
        sysfs_remove_group(&spi->dev.kobj, &ads784x_attr_group);
 
        ads7846_disable(ts);
index 931417eb4f5a2351c21fbfa3a311e448fbc26478..4fa5da8d5fa899a330aca2f401b9a210201ee407 100644 (file)
@@ -637,8 +637,6 @@ static int bu21013_remove(struct i2c_client *client)
 
        kfree(bu21013_data);
 
-       device_init_wakeup(&client->dev, false);
-
        return 0;
 }
 
index fa974579eb41c8ae27fa5fb6e8812caf50969392..16023867b9da7bf2e2b348805c4d6b77a8f14699 100644 (file)
@@ -231,7 +231,6 @@ static int eeti_ts_probe(struct i2c_client *client,
         */
        eeti_ts_stop(priv);
 
-       device_init_wakeup(&client->dev, 0);
        return 0;
 
 err3:
index 7fbb3b0c857150170a293981e1e7940d70478c3f..e0baa7de410215cf56c32f7235ec1fa045ed525b 100644 (file)
@@ -313,7 +313,6 @@ static int lpc32xx_ts_remove(struct platform_device *pdev)
        struct lpc32xx_tsc *tsc = platform_get_drvdata(pdev);
        struct resource *res;
 
-       device_init_wakeup(&pdev->dev, 0);
        free_irq(tsc->irq, tsc);
 
        input_unregister_device(tsc->dev);
index e943678ce54cd48c64240d63e964408e670d4417..be5615c6bf8ff5e99b2d3d49350526b51a9223d8 100644 (file)
@@ -237,7 +237,6 @@ static int st1232_ts_remove(struct i2c_client *client)
 {
        struct st1232_ts_data *ts = i2c_get_clientdata(client);
 
-       device_init_wakeup(&client->dev, 0);
        st1232_ts_power(ts, false);
 
        return 0;