Input: touchscreen - use local variables consistently
authorGuenter Roeck <linux@roeck-us.net>
Sun, 22 Jan 2017 07:46:47 +0000 (23:46 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 22 Jan 2017 07:53:17 +0000 (23:53 -0800)
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>
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/input/touchscreen/fsl-imx25-tcq.c
drivers/input/touchscreen/ili210x.c
drivers/input/touchscreen/pixcir_i2c_ts.c
drivers/input/touchscreen/rohm_bu21023.c
drivers/input/touchscreen/s3c2410_ts.c

index e5d185fe69b97d7a8c744487fcbbbe32027e398b..2302aef2b2d403d47f8384c0127ad91104788ef5 100644 (file)
@@ -2509,7 +2509,7 @@ static void mxt_debug_init(struct mxt_data *data)
                dbg->t37_pages = MXT1386_COLUMNS * MXT1386_PAGES_PER_COLUMN;
        else
                dbg->t37_pages = DIV_ROUND_UP(data->xsize *
-                                             data->info.matrix_ysize *
+                                             info->matrix_ysize *
                                              sizeof(u16),
                                              sizeof(dbg->t37_buf->data));
 
index d50ee490c9ccacf653a3b04dbecbc43b0f78ec2e..47fe1f184bbca342977d10057f4801364427818e 100644 (file)
@@ -507,7 +507,7 @@ static int mx25_tcq_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct input_dev *idev;
        struct mx25_tcq_priv *priv;
-       struct mx25_tsadc *tsadc = dev_get_drvdata(pdev->dev.parent);
+       struct mx25_tsadc *tsadc = dev_get_drvdata(dev->parent);
        struct resource *res;
        void __iomem *mem;
        int error;
index fe4848bd1f4c3ecc564a9eaa479f029f4e590c45..91dc5fb34fe1c222912c415775a8b74843398597 100644 (file)
@@ -280,7 +280,7 @@ static int ili210x_i2c_probe(struct i2c_client *client,
                goto err_remove_sysfs;
        }
 
-       device_init_wakeup(&client->dev, 1);
+       device_init_wakeup(dev, 1);
 
        dev_dbg(dev,
                "ILI210x initialized (IRQ: %d), firmware version %d.%d.%d",
index 3bb0637d832e412944d9f6511c99e32705785702..37ff672c780233a4f1423564288c104a6f32e5e0 100644 (file)
@@ -461,7 +461,7 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
                if (error)
                        return error;
        } else {
-               dev_err(&client->dev, "platform data not defined\n");
+               dev_err(dev, "platform data not defined\n");
                return -EINVAL;
        }
 
@@ -483,7 +483,7 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
        input->id.bustype = BUS_I2C;
        input->open = pixcir_input_open;
        input->close = pixcir_input_close;
-       input->dev.parent = &client->dev;
+       input->dev.parent = dev;
 
        if (pdata) {
                input_set_abs_params(input, ABS_MT_POSITION_X, 0, pdata->x_max, 0, 0);
index 611156a2ef80d7a1381597d59444083807316bd9..eeaf6ff035974c836668a0aaec55fb4bd0f05965 100644 (file)
@@ -1189,8 +1189,7 @@ static int rohm_bu21023_i2c_probe(struct i2c_client *client,
        error = devm_add_action(dev, rohm_ts_remove_sysfs_group, dev);
        if (error) {
                rohm_ts_remove_sysfs_group(dev);
-               dev_err(&client->dev,
-                       "Failed to add sysfs cleanup action: %d\n",
+               dev_err(dev, "Failed to add sysfs cleanup action: %d\n",
                        error);
                return error;
        }
index a4a103e1d11b0ae6f65fe3ce496755b5618c898e..41d58e88cc8a0de6c1e42eec64801e8838ff0447 100644 (file)
@@ -250,7 +250,7 @@ static int s3c2410ts_probe(struct platform_device *pdev)
 
        ts.dev = dev;
 
-       info = dev_get_platdata(&pdev->dev);
+       info = dev_get_platdata(dev);
        if (!info) {
                dev_err(dev, "no platform data, cannot attach\n");
                return -EINVAL;