diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-10-04 16:53:45 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-10-04 16:53:45 -0400 |
commit | 18669eabde2ff5fc446e72e043f0539059763438 (patch) | |
tree | 7635908abd3fe90095133abb00fb41812a2a260e /drivers | |
parent | 03f1805ad0ce5aae02bfe40c29b230abb63179ac (diff) |
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=14293
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-amd756.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-amd8111.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-isch.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-piix4.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-sis96x.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-viapro.c | 2 |
7 files changed, 12 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index f7d6fe9c49ba..8f0b90ef8c76 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c | |||
@@ -364,7 +364,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev, | |||
364 | error = acpi_check_region(amd756_ioport, SMB_IOSIZE, | 364 | error = acpi_check_region(amd756_ioport, SMB_IOSIZE, |
365 | amd756_driver.name); | 365 | amd756_driver.name); |
366 | if (error) | 366 | if (error) |
367 | return error; | 367 | return -ENODEV; |
368 | 368 | ||
369 | if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) { | 369 | if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) { |
370 | dev_err(&pdev->dev, "SMB region 0x%x already in use!\n", | 370 | dev_err(&pdev->dev, "SMB region 0x%x already in use!\n", |
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c index a7c59908c457..5b4ad86ca166 100644 --- a/drivers/i2c/busses/i2c-amd8111.c +++ b/drivers/i2c/busses/i2c-amd8111.c | |||
@@ -376,8 +376,10 @@ static int __devinit amd8111_probe(struct pci_dev *dev, | |||
376 | smbus->size = pci_resource_len(dev, 0); | 376 | smbus->size = pci_resource_len(dev, 0); |
377 | 377 | ||
378 | error = acpi_check_resource_conflict(&dev->resource[0]); | 378 | error = acpi_check_resource_conflict(&dev->resource[0]); |
379 | if (error) | 379 | if (error) { |
380 | error = -ENODEV; | ||
380 | goto out_kfree; | 381 | goto out_kfree; |
382 | } | ||
381 | 383 | ||
382 | if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { | 384 | if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { |
383 | error = -EBUSY; | 385 | error = -EBUSY; |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 9d2c5adf5d4f..55edcfe5b851 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -732,8 +732,10 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id | |||
732 | } | 732 | } |
733 | 733 | ||
734 | err = acpi_check_resource_conflict(&dev->resource[SMBBAR]); | 734 | err = acpi_check_resource_conflict(&dev->resource[SMBBAR]); |
735 | if (err) | 735 | if (err) { |
736 | err = -ENODEV; | ||
736 | goto exit; | 737 | goto exit; |
738 | } | ||
737 | 739 | ||
738 | err = pci_request_region(dev, SMBBAR, i801_driver.name); | 740 | err = pci_request_region(dev, SMBBAR, i801_driver.name); |
739 | if (err) { | 741 | if (err) { |
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index 9f6b8e0f8632..dba6eb053e2f 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c | |||
@@ -281,7 +281,7 @@ static int __devinit sch_probe(struct pci_dev *dev, | |||
281 | return -ENODEV; | 281 | return -ENODEV; |
282 | } | 282 | } |
283 | if (acpi_check_region(sch_smba, SMBIOSIZE, sch_driver.name)) | 283 | if (acpi_check_region(sch_smba, SMBIOSIZE, sch_driver.name)) |
284 | return -EBUSY; | 284 | return -ENODEV; |
285 | if (!request_region(sch_smba, SMBIOSIZE, sch_driver.name)) { | 285 | if (!request_region(sch_smba, SMBIOSIZE, sch_driver.name)) { |
286 | dev_err(&dev->dev, "SMBus region 0x%x already in use!\n", | 286 | dev_err(&dev->dev, "SMBus region 0x%x already in use!\n", |
287 | sch_smba); | 287 | sch_smba); |
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index a782c7a08f9e..d26a972aacaa 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c | |||
@@ -169,7 +169,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, | |||
169 | } | 169 | } |
170 | 170 | ||
171 | if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) | 171 | if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) |
172 | return -EBUSY; | 172 | return -ENODEV; |
173 | 173 | ||
174 | if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { | 174 | if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { |
175 | dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", | 175 | 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 | 260 | ||
261 | piix4_smba = ((smba_en_hi << 8) | smba_en_lo) & 0xffe0; | 261 | piix4_smba = ((smba_en_hi << 8) | smba_en_lo) & 0xffe0; |
262 | if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) | 262 | if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) |
263 | return -EBUSY; | 263 | return -ENODEV; |
264 | 264 | ||
265 | if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { | 265 | if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { |
266 | dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", | 266 | dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", |
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c index 8295885b2fdb..1649963b00dc 100644 --- a/drivers/i2c/busses/i2c-sis96x.c +++ b/drivers/i2c/busses/i2c-sis96x.c | |||
@@ -280,7 +280,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev, | |||
280 | 280 | ||
281 | retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]); | 281 | retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]); |
282 | if (retval) | 282 | if (retval) |
283 | return retval; | 283 | return -ENODEV; |
284 | 284 | ||
285 | /* Everything is happy, let's grab the memory and set things up. */ | 285 | /* Everything is happy, let's grab the memory and set things up. */ |
286 | if (!request_region(sis96x_smbus_base, SMB_IOSIZE, | 286 | if (!request_region(sis96x_smbus_base, SMB_IOSIZE, |
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 54d810a4d00f..e4b1543015af 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
@@ -365,7 +365,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev, | |||
365 | found: | 365 | found: |
366 | error = acpi_check_region(vt596_smba, 8, vt596_driver.name); | 366 | error = acpi_check_region(vt596_smba, 8, vt596_driver.name); |
367 | if (error) | 367 | if (error) |
368 | return error; | 368 | return -ENODEV; |
369 | 369 | ||
370 | if (!request_region(vt596_smba, 8, vt596_driver.name)) { | 370 | if (!request_region(vt596_smba, 8, vt596_driver.name)) { |
371 | dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n", | 371 | dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n", |