提交 f0776b8c 编写于 作者: P Peter Tyser 提交者: Lee Jones

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: NPeter Tyser <ptyser@xes-inc.com>
Tested-by: NRajat Jain <rajatjain@juniper.net>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 f5dccb15
......@@ -967,13 +967,17 @@ static int lpc_ich_probe(struct pci_dev *dev,
pci_set_drvdata(dev, priv);
ret = lpc_ich_init_wdt(dev);
if (!ret)
cell_added = true;
if (lpc_chipset_info[priv->chipset].iTCO_version) {
ret = lpc_ich_init_wdt(dev);
if (!ret)
cell_added = true;
}
ret = lpc_ich_init_gpio(dev);
if (!ret)
cell_added = true;
if (lpc_chipset_info[priv->chipset].gpio_version) {
ret = lpc_ich_init_gpio(dev);
if (!ret)
cell_added = true;
}
/*
* We only care if at least one or none of the cells registered
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册