hwmon: (ina2xx) Remove casting the return value which is a void pointer
authorJingoo Han <jg1.han@samsung.com>
Mon, 9 Sep 2013 05:29:32 +0000 (14:29 +0900)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 10 Sep 2013 13:28:31 +0000 (06:28 -0700)
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina2xx.c

index 18c062360ca7950e77ef4573ddf3dbc9fc16be82..70a39a8ac0160e520f6017225c71d1efedebca2c 100644 (file)
@@ -233,8 +233,7 @@ static int ina2xx_probe(struct i2c_client *client,
                return -ENOMEM;
 
        if (dev_get_platdata(&client->dev)) {
-               pdata =
-                 (struct ina2xx_platform_data *)dev_get_platdata(&client->dev);
+               pdata = dev_get_platdata(&client->dev);
                shunt = pdata->shunt_uohms;
        } else if (!of_property_read_u32(client->dev.of_node,
                                "shunt-resistor", &val)) {