Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

-4
-4
drivers/hwmon/ltc4245.c
··· 467 467 static bool ltc4245_use_extra_gpios(struct i2c_client *client) 468 468 { 469 469 struct ltc4245_platform_data *pdata = dev_get_platdata(&client->dev); 470 - #ifdef CONFIG_OF 471 470 struct device_node *np = client->dev.of_node; 472 - #endif 473 471 474 472 /* prefer platform data */ 475 473 if (pdata) 476 474 return pdata->use_extra_gpios; 477 475 478 - #ifdef CONFIG_OF 479 476 /* fallback on OF */ 480 477 if (of_find_property(np, "ltc4245,use-extra-gpios", NULL)) 481 478 return true; 482 - #endif 483 479 484 480 return false; 485 481 }