aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/lpc_ich.c
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2014-03-10 17:34:52 -0400
committerLee Jones <lee.jones@linaro.org>2014-03-19 05:00:00 -0400
commitf0776b8ce03ceb638c51b62f324844c71c446600 (patch)
treeae9cf75ad657fe5b5e83b446ddd346ec8ebee688 /drivers/mfd/lpc_ich.c
parentf5dccb15877b82a40950c6f752d5345c86189fc9 (diff)
mfd: lpc_ich: Only configure watchdog or GPIO when present
Some chipsets don't currently have GPIO support enabled. For these chipsets don't go through the process of initializing the GPIO region. Make the same change for the watchdog initialization for chipsets which may not enable the WDT in the future. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Tested-by: Rajat Jain <rajatjain@juniper.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/lpc_ich.c')
-rw-r--r--drivers/mfd/lpc_ich.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index 2be85a4b36c0..cffa8367ddcf 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -967,13 +967,17 @@ static int lpc_ich_probe(struct pci_dev *dev,
967 967
968 pci_set_drvdata(dev, priv); 968 pci_set_drvdata(dev, priv);
969 969
970 ret = lpc_ich_init_wdt(dev); 970 if (lpc_chipset_info[priv->chipset].iTCO_version) {
971 if (!ret) 971 ret = lpc_ich_init_wdt(dev);
972 cell_added = true; 972 if (!ret)
973 cell_added = true;
974 }
973 975
974 ret = lpc_ich_init_gpio(dev); 976 if (lpc_chipset_info[priv->chipset].gpio_version) {
975 if (!ret) 977 ret = lpc_ich_init_gpio(dev);
976 cell_added = true; 978 if (!ret)
979 cell_added = true;
980 }
977 981
978 /* 982 /*
979 * We only care if at least one or none of the cells registered 983 * We only care if at least one or none of the cells registered