diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-02-02 17:14:26 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-03-03 11:01:05 -0500 |
commit | 4fa6cbb1b88b647a37776a50ee31e68c30732345 (patch) | |
tree | 84e8ed035af5f6bee714493bf0ced20b865dd37f | |
parent | bdd41aae69f99394d4dd2026e5adfa882b748ba1 (diff) |
hwmon: (ltc4245) Remove devicetree conditionals
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>
-rw-r--r-- | drivers/hwmon/ltc4245.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/hwmon/ltc4245.c b/drivers/hwmon/ltc4245.c index aa36c2332614..681b5b7b3c3b 100644 --- a/drivers/hwmon/ltc4245.c +++ b/drivers/hwmon/ltc4245.c | |||
@@ -467,19 +467,15 @@ static void ltc4245_sysfs_add_groups(struct ltc4245_data *data) | |||
467 | static bool ltc4245_use_extra_gpios(struct i2c_client *client) | 467 | static bool ltc4245_use_extra_gpios(struct i2c_client *client) |
468 | { | 468 | { |
469 | struct ltc4245_platform_data *pdata = dev_get_platdata(&client->dev); | 469 | struct ltc4245_platform_data *pdata = dev_get_platdata(&client->dev); |
470 | #ifdef CONFIG_OF | ||
471 | struct device_node *np = client->dev.of_node; | 470 | struct device_node *np = client->dev.of_node; |
472 | #endif | ||
473 | 471 | ||
474 | /* prefer platform data */ | 472 | /* prefer platform data */ |
475 | if (pdata) | 473 | if (pdata) |
476 | return pdata->use_extra_gpios; | 474 | return pdata->use_extra_gpios; |
477 | 475 | ||
478 | #ifdef CONFIG_OF | ||
479 | /* fallback on OF */ | 476 | /* fallback on OF */ |
480 | if (of_find_property(np, "ltc4245,use-extra-gpios", NULL)) | 477 | if (of_find_property(np, "ltc4245,use-extra-gpios", NULL)) |
481 | return true; | 478 | return true; |
482 | #endif | ||
483 | 479 | ||
484 | return false; | 480 | return false; |
485 | } | 481 | } |