hwmon: Only include of_match_table with CONFIG_OF_GPIO
authorJamie Lentin <jm@lentin.co.uk>
Thu, 1 Nov 2012 23:55:43 +0000 (23:55 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 2 Nov 2012 00:31:20 +0000 (17:31 -0700)
commiteaa7cc60f7dff5e74ef387ace8228235fab8241b
tree4f590582b3bf8dcab75507810b9996aa1499522f
parentd034fbf08b6fe86271d0d0bd332edabeb5749fd6
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>
drivers/hwmon/gpio-fan.c