Skip to content

Commit a0d86ec

Browse files
groeckdtor
authored andcommitted
Input: misc - use local variables consistently
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>
1 parent b4e66e7 commit a0d86ec

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎drivers/input/misc/drv260x.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ static int drv260x_probe(struct i2c_client *client,
538538

539539
haptics->input_dev = devm_input_allocate_device(dev);
540540
if (!haptics->input_dev) {
541-
dev_err(&client->dev, "Failed to allocate input device\n");
541+
dev_err(dev, "Failed to allocate input device\n");
542542
return -ENOMEM;
543543
}
544544

‎drivers/input/misc/gpio_tilt_polled.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static int gpio_tilt_polled_probe(struct platform_device *pdev)
138138

139139
input->name = pdev->name;
140140
input->phys = DRV_NAME"/input0";
141-
input->dev.parent = &pdev->dev;
141+
input->dev.parent = dev;
142142

143143
input->id.bustype = BUS_HOST;
144144
input->id.vendor = 0x0001;

‎drivers/input/misc/hisi_powerkey.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev)
7575
struct input_dev *input;
7676
int irq, i, error;
7777

78-
input = devm_input_allocate_device(&pdev->dev);
78+
input = devm_input_allocate_device(dev);
7979
if (!input) {
80-
dev_err(&pdev->dev, "failed to allocate input device\n");
80+
dev_err(dev, "failed to allocate input device\n");
8181
return -ENOMEM;
8282
}
8383

@@ -111,12 +111,11 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev)
111111

112112
error = input_register_device(input);
113113
if (error) {
114-
dev_err(&pdev->dev, "failed to register input device: %d\n",
115-
error);
114+
dev_err(dev, "failed to register input device: %d\n", error);
116115
return error;
117116
}
118117

119-
device_init_wakeup(&pdev->dev, 1);
118+
device_init_wakeup(dev, 1);
120119

121120
return 0;
122121
}

0 commit comments

Comments
 (0)