diff options
author | Guenter Roeck <linux@roeck-us.net> | 2017-01-22 10:40:45 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-01-22 10:51:54 +0300 |
commit | b4e66e7d1948e0a54a38102462b016ee1ed489c2 (patch) | |
tree | 6977133523c8e2b3bbda74dd3207fd3d099f5374 /drivers/input/keyboard/gpio_keys_polled.c | |
parent | 8300445cc7c14b1532a4891f2d25a649d6437daa (diff) | |
download | linux-b4e66e7d1948e0a54a38102462b016ee1ed489c2.tar.xz |
Input: keyboard - 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>
Diffstat (limited to 'drivers/input/keyboard/gpio_keys_polled.c')
-rw-r--r-- | drivers/input/keyboard/gpio_keys_polled.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index cc193e665358..4fce43a6a0e0 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -252,13 +252,13 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) size = sizeof(struct gpio_keys_polled_dev) + pdata->nbuttons * sizeof(struct gpio_keys_button_data); - bdev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL); + bdev = devm_kzalloc(dev, size, GFP_KERNEL); if (!bdev) { dev_err(dev, "no memory for private data\n"); return -ENOMEM; } - poll_dev = devm_input_allocate_polled_device(&pdev->dev); + poll_dev = devm_input_allocate_polled_device(dev); if (!poll_dev) { dev_err(dev, "no memory for polled device\n"); return -ENOMEM; @@ -332,7 +332,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) if (button->active_low) flags |= GPIOF_ACTIVE_LOW; - error = devm_gpio_request_one(&pdev->dev, button->gpio, + error = devm_gpio_request_one(dev, button->gpio, flags, button->desc ? : DRV_NAME); if (error) { dev_err(dev, |