aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJamie Lentin <jm@lentin.co.uk>2012-11-01 19:55:43 -0400
committerGuenter Roeck <linux@roeck-us.net>2012-11-01 20:31:20 -0400
commiteaa7cc60f7dff5e74ef387ace8228235fab8241b (patch)
tree4f590582b3bf8dcab75507810b9996aa1499522f /drivers/hwmon
parentd034fbf08b6fe86271d0d0bd332edabeb5749fd6 (diff)
hwmon: Only include of_match_table with CONFIG_OF_GPIO
The following fixes build errors on sparc. Without any DT support, of_match_ptr is NULL and the below is a no-op. However, if just CONFIG_OF is defined then so is of_match_ptr. All useful parts of the gpio-fan DT support rely on CONFIG_OF_GPIO anyway, so of_match_table should too. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/gpio-fan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 36509ae32083..1381a2e3bbd4 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -630,7 +630,9 @@ static struct platform_driver gpio_fan_driver = {
630 .driver = { 630 .driver = {
631 .name = "gpio-fan", 631 .name = "gpio-fan",
632 .pm = GPIO_FAN_PM, 632 .pm = GPIO_FAN_PM,
633#ifdef CONFIG_OF_GPIO
633 .of_match_table = of_match_ptr(of_gpio_fan_match), 634 .of_match_table = of_match_ptr(of_gpio_fan_match),
635#endif
634 }, 636 },
635}; 637};
636 638