]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
hwmon: (ltc4245) Remove devicetree conditionals
authorGuenter Roeck <linux@roeck-us.net>
Sun, 2 Feb 2014 22:14:26 +0000 (14:14 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 3 Mar 2014 16:01:05 +0000 (08:01 -0800)
Devicetree functions are stubbed out if CONFIG_OF is undefined.
Therefore, conditional compilation is unnecessary and can be removed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
drivers/hwmon/ltc4245.c

index aa36c2332614caee96460c86bbeb4c1a3a4a92a2..681b5b7b3c3b5d2b9de7316e1a217d2b2eaf164a 100644 (file)
@@ -467,19 +467,15 @@ static void ltc4245_sysfs_add_groups(struct ltc4245_data *data)
 static bool ltc4245_use_extra_gpios(struct i2c_client *client)
 {
        struct ltc4245_platform_data *pdata = dev_get_platdata(&client->dev);
-#ifdef CONFIG_OF
        struct device_node *np = client->dev.of_node;
-#endif
 
        /* prefer platform data */
        if (pdata)
                return pdata->use_extra_gpios;
 
-#ifdef CONFIG_OF
        /* fallback on OF */
        if (of_find_property(np, "ltc4245,use-extra-gpios", NULL))
                return true;
-#endif
 
        return false;
 }