Skip to content

Commit

Permalink
Input: misc - use local variables consistently
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
groeck authored and dtor committed Jan 22, 2017
1 parent b4e66e7 commit a0d86ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/input/misc/drv260x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/input/misc/gpio_tilt_polled.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 4 additions & 5 deletions drivers/input/misc/hisi_powerkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a0d86ec

Please sign in to comment.