Skip to content

Commit

Permalink
mfd: lpc_ich: One uninitialized cell is no error
Browse files Browse the repository at this point in the history
At every boot of an (outdated) laptop lpc_ich prints an error:
    lpc_ich 0000:00:1f.0: I/O space for GPIO uninitialized

But if one looks at lpc_ich's probe function one notices that the code
only cares if both lpc_ich_init_wdt() and lpc_ich_init_gpio() fail to
add any cells. So stop treating the failure to add a single cell as an
error. Those messages can be printed at notice level. And then only warn
if no cells were added.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Paul Bolle authored and Samuel Ortiz committed Nov 21, 2012
1 parent e294bc9 commit 0c41884
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/mfd/lpc_ich.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static int __devinit lpc_ich_init_gpio(struct pci_dev *dev,
pci_read_config_dword(dev, ACPIBASE, &base_addr_cfg);
base_addr = base_addr_cfg & 0x0000ff80;
if (!base_addr) {
dev_err(&dev->dev, "I/O space for ACPI uninitialized\n");
dev_notice(&dev->dev, "I/O space for ACPI uninitialized\n");
lpc_ich_cells[LPC_GPIO].num_resources--;
goto gpe0_done;
}
Expand All @@ -760,7 +760,7 @@ static int __devinit lpc_ich_init_gpio(struct pci_dev *dev,
pci_read_config_dword(dev, GPIOBASE, &base_addr_cfg);
base_addr = base_addr_cfg & 0x0000ff80;
if (!base_addr) {
dev_err(&dev->dev, "I/O space for GPIO uninitialized\n");
dev_notice(&dev->dev, "I/O space for GPIO uninitialized\n");
ret = -ENODEV;
goto gpio_done;
}
Expand Down Expand Up @@ -810,7 +810,7 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
pci_read_config_dword(dev, ACPIBASE, &base_addr_cfg);
base_addr = base_addr_cfg & 0x0000ff80;
if (!base_addr) {
dev_err(&dev->dev, "I/O space for ACPI uninitialized\n");
dev_notice(&dev->dev, "I/O space for ACPI uninitialized\n");
ret = -ENODEV;
goto wdt_done;
}
Expand All @@ -837,8 +837,8 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
pci_read_config_dword(dev, RCBABASE, &base_addr_cfg);
base_addr = base_addr_cfg & 0xffffc000;
if (!(base_addr_cfg & 1)) {
pr_err("RCBA is disabled by hardware/BIOS, "
"device disabled\n");
dev_notice(&dev->dev, "RCBA is disabled by "
"hardware/BIOS, device disabled\n");
ret = -ENODEV;
goto wdt_done;
}
Expand Down Expand Up @@ -874,6 +874,7 @@ static int __devinit lpc_ich_probe(struct pci_dev *dev,
* successfully.
*/
if (!cell_added) {
dev_warn(&dev->dev, "No MFD cells added\n");
lpc_ich_restore_config_space(dev);
return -ENODEV;
}
Expand Down

0 comments on commit 0c41884

Please sign in to comment.