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

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>

authored by

Guenter Roeck and committed by
Dmitry Torokhov
a0d86ecd b4e66e7d

+6 -7
+1 -1
drivers/input/misc/drv260x.c
··· 538 538 539 539 haptics->input_dev = devm_input_allocate_device(dev); 540 540 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"); 542 542 return -ENOMEM; 543 543 } 544 544
+1 -1
drivers/input/misc/gpio_tilt_polled.c
··· 138 138 139 139 input->name = pdev->name; 140 140 input->phys = DRV_NAME"/input0"; 141 - input->dev.parent = &pdev->dev; 141 + input->dev.parent = dev; 142 142 143 143 input->id.bustype = BUS_HOST; 144 144 input->id.vendor = 0x0001;
+4 -5
drivers/input/misc/hisi_powerkey.c
··· 75 75 struct input_dev *input; 76 76 int irq, i, error; 77 77 78 - input = devm_input_allocate_device(&pdev->dev); 78 + input = devm_input_allocate_device(dev); 79 79 if (!input) { 80 - dev_err(&pdev->dev, "failed to allocate input device\n"); 80 + dev_err(dev, "failed to allocate input device\n"); 81 81 return -ENOMEM; 82 82 } 83 83 ··· 111 111 112 112 error = input_register_device(input); 113 113 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); 116 115 return error; 117 116 } 118 117 119 - device_init_wakeup(&pdev->dev, 1); 118 + device_init_wakeup(dev, 1); 120 119 121 120 return 0; 122 121 }