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/mpr121_touchkey.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/mpr121_touchkey.c')
-rw-r--r-- | drivers/input/keyboard/mpr121_touchkey.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c index 989ca66f63af..884a74d8a7ed 100644 --- a/drivers/input/keyboard/mpr121_touchkey.c +++ b/drivers/input/keyboard/mpr121_touchkey.c @@ -237,7 +237,7 @@ static int mpr_touchkey_probe(struct i2c_client *client, int i; if (!client->irq) { - dev_err(&client->dev, "irq number should not be zero\n"); + dev_err(dev, "irq number should not be zero\n"); return -EINVAL; } @@ -247,11 +247,11 @@ static int mpr_touchkey_probe(struct i2c_client *client, vdd_uv = regulator_get_voltage(vdd_supply); - mpr121 = devm_kzalloc(&client->dev, sizeof(*mpr121), GFP_KERNEL); + mpr121 = devm_kzalloc(dev, sizeof(*mpr121), GFP_KERNEL); if (!mpr121) return -ENOMEM; - input_dev = devm_input_allocate_device(&client->dev); + input_dev = devm_input_allocate_device(dev); if (!input_dev) return -ENOMEM; @@ -275,7 +275,7 @@ static int mpr_touchkey_probe(struct i2c_client *client, input_dev->name = "Freescale MPR121 Touchkey"; input_dev->id.bustype = BUS_I2C; - input_dev->dev.parent = &client->dev; + input_dev->dev.parent = dev; if (device_property_read_bool(dev, "autorepeat")) __set_bit(EV_REP, input_dev->evbit); input_set_capability(input_dev, EV_MSC, MSC_SCAN); @@ -289,16 +289,16 @@ static int mpr_touchkey_probe(struct i2c_client *client, error = mpr121_phys_init(mpr121, client, vdd_uv); if (error) { - dev_err(&client->dev, "Failed to init register\n"); + dev_err(dev, "Failed to init register\n"); return error; } - error = devm_request_threaded_irq(&client->dev, client->irq, - NULL, mpr_touchkey_interrupt, + error = devm_request_threaded_irq(dev, client->irq, NULL, + mpr_touchkey_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, - client->dev.driver->name, mpr121); + dev->driver->name, mpr121); if (error) { - dev_err(&client->dev, "Failed to register interrupt\n"); + dev_err(dev, "Failed to register interrupt\n"); return error; } |