Input: misc - use local variables consistently
authorGuenter Roeck <linux@roeck-us.net>
Sun, 22 Jan 2017 07:44:18 +0000 (23:44 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 22 Jan 2017 07:51:56 +0000 (23:51 -0800)
If a function declares a variable to access a structure element,
use it consistently.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/drv260x.c
drivers/input/misc/gpio_tilt_polled.c
drivers/input/misc/hisi_powerkey.c

index 0a2b865b100040d99731abe52c1261c5f390f1b3..fb089d36c0d65e2b0edbf7ec16f05773f286e552 100644 (file)
@@ -538,7 +538,7 @@ static int drv260x_probe(struct i2c_client *client,
 
        haptics->input_dev = devm_input_allocate_device(dev);
        if (!haptics->input_dev) {
-               dev_err(&client->dev, "Failed to allocate input device\n");
+               dev_err(dev, "Failed to allocate input device\n");
                return -ENOMEM;
        }
 
index f103b99d18529a80e2945c04df4fb95d35d4bfd3..6e217a45e39a804e917a822fd4aee502daca7c96 100644 (file)
@@ -138,7 +138,7 @@ static int gpio_tilt_polled_probe(struct platform_device *pdev)
 
        input->name = pdev->name;
        input->phys = DRV_NAME"/input0";
-       input->dev.parent = &pdev->dev;
+       input->dev.parent = dev;
 
        input->id.bustype = BUS_HOST;
        input->id.vendor = 0x0001;
index 675539c529ce75e06b2a70325347044ea7799eb3..c4c42124a059af94c9fe0ab2ca28ce6e2cf95638 100644 (file)
@@ -75,9 +75,9 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev)
        struct input_dev *input;
        int irq, i, error;
 
-       input = devm_input_allocate_device(&pdev->dev);
+       input = devm_input_allocate_device(dev);
        if (!input) {
-               dev_err(&pdev->dev, "failed to allocate input device\n");
+               dev_err(dev, "failed to allocate input device\n");
                return -ENOMEM;
        }
 
@@ -111,12 +111,11 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev)
 
        error = input_register_device(input);
        if (error) {
-               dev_err(&pdev->dev, "failed to register input device: %d\n",
-                       error);
+               dev_err(dev, "failed to register input device: %d\n", error);
                return error;
        }
 
-       device_init_wakeup(&pdev->dev, 1);
+       device_init_wakeup(dev, 1);
 
        return 0;
 }