Commit eaa7cc60 authored by Jamie Lentin's avatar Jamie Lentin Committed by Guenter Roeck

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: default avatarJamie Lentin <jm@lentin.co.uk>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent d034fbf0
...@@ -630,7 +630,9 @@ static struct platform_driver gpio_fan_driver = { ...@@ -630,7 +630,9 @@ static struct platform_driver gpio_fan_driver = {
.driver = { .driver = {
.name = "gpio-fan", .name = "gpio-fan",
.pm = GPIO_FAN_PM, .pm = GPIO_FAN_PM,
#ifdef CONFIG_OF_GPIO
.of_match_table = of_match_ptr(of_gpio_fan_match), .of_match_table = of_match_ptr(of_gpio_fan_match),
#endif
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment