Input: synaptics-rmi4 - use local variables consistently
authorGuenter Roeck <linux@roeck-us.net>
Sun, 22 Jan 2017 07:46:16 +0000 (23:46 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 22 Jan 2017 07:57:58 +0000 (23:57 -0800)
If a function declares a variable to access a structure element,
use it conssistently.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_bus.c
drivers/input/rmi4/rmi_driver.c

index df97d8679badbf29b7dcdfa78b657ff9021193ea..8f4ca8691a699d8643b80c7143d1f3d580dc10ae 100644 (file)
@@ -262,10 +262,10 @@ int __rmi_register_function_handler(struct rmi_function_handler *handler,
        driver->probe = rmi_function_probe;
        driver->remove = rmi_function_remove;
 
-       error = driver_register(&handler->driver);
+       error = driver_register(driver);
        if (error) {
                pr_err("driver_register() failed for %s, error: %d\n",
-                       handler->driver.name, error);
+                       driver->name, error);
                return error;
        }
 
index cb6efe6933022f1fa3141f4cb6bce366e1141617..30397cc7283a178dc6a086fb25012908a7939515 100644 (file)
@@ -837,7 +837,7 @@ static int rmi_create_function(struct rmi_device *rmi_dev,
                               void *ctx, const struct pdt_entry *pdt)
 {
        struct device *dev = &rmi_dev->dev;
-       struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
+       struct rmi_driver_data *data = dev_get_drvdata(dev);
        int *current_irq_count = ctx;
        struct rmi_function *fn;
        int i;
@@ -1041,7 +1041,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
        }
 
        if (data->bootloader_mode)
-               dev_warn(&rmi_dev->dev, "Device in bootloader mode.\n");
+               dev_warn(dev, "Device in bootloader mode.\n");
 
        data->irq_count = irq_count;
        data->num_of_irq_regs = (data->irq_count + 7) / 8;