mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-18 05:04:04 +00:00
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>
This commit is contained in:
parent
bdd41aae69
commit
4fa6cbb1b8
1 changed files with 0 additions and 4 deletions
|
@ -467,19 +467,15 @@ static void ltc4245_sysfs_add_groups(struct ltc4245_data *data)
|
||||||
static bool ltc4245_use_extra_gpios(struct i2c_client *client)
|
static bool ltc4245_use_extra_gpios(struct i2c_client *client)
|
||||||
{
|
{
|
||||||
struct ltc4245_platform_data *pdata = dev_get_platdata(&client->dev);
|
struct ltc4245_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||||
#ifdef CONFIG_OF
|
|
||||||
struct device_node *np = client->dev.of_node;
|
struct device_node *np = client->dev.of_node;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* prefer platform data */
|
/* prefer platform data */
|
||||||
if (pdata)
|
if (pdata)
|
||||||
return pdata->use_extra_gpios;
|
return pdata->use_extra_gpios;
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
|
||||||
/* fallback on OF */
|
/* fallback on OF */
|
||||||
if (of_find_property(np, "ltc4245,use-extra-gpios", NULL))
|
if (of_find_property(np, "ltc4245,use-extra-gpios", NULL))
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue