Commit 18669eab authored by Jean Delvare's avatar Jean Delvare

i2c: Hide probe errors caused by ACPI resource conflicts

When an ACPI resource conflict is detected, error messages are already
printed by ACPI. There's no point in causing the driver core to print
more error messages, so return one of the error codes for which no
message is printed.

This fixes bug #14293:
http://bugzilla.kernel.org/show_bug.cgi?id=14293Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 03f1805a
...@@ -364,7 +364,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev, ...@@ -364,7 +364,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
error = acpi_check_region(amd756_ioport, SMB_IOSIZE, error = acpi_check_region(amd756_ioport, SMB_IOSIZE,
amd756_driver.name); amd756_driver.name);
if (error) if (error)
return error; return -ENODEV;
if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) { if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) {
dev_err(&pdev->dev, "SMB region 0x%x already in use!\n", dev_err(&pdev->dev, "SMB region 0x%x already in use!\n",
......
...@@ -376,8 +376,10 @@ static int __devinit amd8111_probe(struct pci_dev *dev, ...@@ -376,8 +376,10 @@ static int __devinit amd8111_probe(struct pci_dev *dev,
smbus->size = pci_resource_len(dev, 0); smbus->size = pci_resource_len(dev, 0);
error = acpi_check_resource_conflict(&dev->resource[0]); error = acpi_check_resource_conflict(&dev->resource[0]);
if (error) if (error) {
error = -ENODEV;
goto out_kfree; goto out_kfree;
}
if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) {
error = -EBUSY; error = -EBUSY;
......
...@@ -732,8 +732,10 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id ...@@ -732,8 +732,10 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id
} }
err = acpi_check_resource_conflict(&dev->resource[SMBBAR]); err = acpi_check_resource_conflict(&dev->resource[SMBBAR]);
if (err) if (err) {
err = -ENODEV;
goto exit; goto exit;
}
err = pci_request_region(dev, SMBBAR, i801_driver.name); err = pci_request_region(dev, SMBBAR, i801_driver.name);
if (err) { if (err) {
......
...@@ -281,7 +281,7 @@ static int __devinit sch_probe(struct pci_dev *dev, ...@@ -281,7 +281,7 @@ static int __devinit sch_probe(struct pci_dev *dev,
return -ENODEV; return -ENODEV;
} }
if (acpi_check_region(sch_smba, SMBIOSIZE, sch_driver.name)) if (acpi_check_region(sch_smba, SMBIOSIZE, sch_driver.name))
return -EBUSY; return -ENODEV;
if (!request_region(sch_smba, SMBIOSIZE, sch_driver.name)) { if (!request_region(sch_smba, SMBIOSIZE, sch_driver.name)) {
dev_err(&dev->dev, "SMBus region 0x%x already in use!\n", dev_err(&dev->dev, "SMBus region 0x%x already in use!\n",
sch_smba); sch_smba);
......
...@@ -169,7 +169,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, ...@@ -169,7 +169,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
} }
if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name))
return -EBUSY; return -ENODEV;
if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) {
dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n",
...@@ -260,7 +260,7 @@ static int __devinit piix4_setup_sb800(struct pci_dev *PIIX4_dev, ...@@ -260,7 +260,7 @@ static int __devinit piix4_setup_sb800(struct pci_dev *PIIX4_dev,
piix4_smba = ((smba_en_hi << 8) | smba_en_lo) & 0xffe0; piix4_smba = ((smba_en_hi << 8) | smba_en_lo) & 0xffe0;
if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name))
return -EBUSY; return -ENODEV;
if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) {
dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n",
......
...@@ -280,7 +280,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev, ...@@ -280,7 +280,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev,
retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]); retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]);
if (retval) if (retval)
return retval; return -ENODEV;
/* Everything is happy, let's grab the memory and set things up. */ /* Everything is happy, let's grab the memory and set things up. */
if (!request_region(sis96x_smbus_base, SMB_IOSIZE, if (!request_region(sis96x_smbus_base, SMB_IOSIZE,
......
...@@ -365,7 +365,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev, ...@@ -365,7 +365,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
found: found:
error = acpi_check_region(vt596_smba, 8, vt596_driver.name); error = acpi_check_region(vt596_smba, 8, vt596_driver.name);
if (error) if (error)
return error; return -ENODEV;
if (!request_region(vt596_smba, 8, vt596_driver.name)) { if (!request_region(vt596_smba, 8, vt596_driver.name)) {
dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n", dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n",
......
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