Commit 18669eabde2ff5fc446e72e043f0539059763438
1 parent
03f1805ad0
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>
Showing 7 changed files with 12 additions and 8 deletions Side-by-side Diff
drivers/i2c/busses/i2c-amd756.c
... | ... | @@ -364,7 +364,7 @@ |
364 | 364 | error = acpi_check_region(amd756_ioport, SMB_IOSIZE, |
365 | 365 | amd756_driver.name); |
366 | 366 | if (error) |
367 | - return error; | |
367 | + return -ENODEV; | |
368 | 368 | |
369 | 369 | if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) { |
370 | 370 | dev_err(&pdev->dev, "SMB region 0x%x already in use!\n", |
drivers/i2c/busses/i2c-amd8111.c
... | ... | @@ -376,8 +376,10 @@ |
376 | 376 | smbus->size = pci_resource_len(dev, 0); |
377 | 377 | |
378 | 378 | error = acpi_check_resource_conflict(&dev->resource[0]); |
379 | - if (error) | |
379 | + if (error) { | |
380 | + error = -ENODEV; | |
380 | 381 | goto out_kfree; |
382 | + } | |
381 | 383 | |
382 | 384 | if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { |
383 | 385 | error = -EBUSY; |
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-isch.c
... | ... | @@ -281,7 +281,7 @@ |
281 | 281 | return -ENODEV; |
282 | 282 | } |
283 | 283 | if (acpi_check_region(sch_smba, SMBIOSIZE, sch_driver.name)) |
284 | - return -EBUSY; | |
284 | + return -ENODEV; | |
285 | 285 | if (!request_region(sch_smba, SMBIOSIZE, sch_driver.name)) { |
286 | 286 | dev_err(&dev->dev, "SMBus region 0x%x already in use!\n", |
287 | 287 | sch_smba); |
drivers/i2c/busses/i2c-piix4.c
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | } |
170 | 170 | |
171 | 171 | if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) |
172 | - return -EBUSY; | |
172 | + return -ENODEV; | |
173 | 173 | |
174 | 174 | if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { |
175 | 175 | dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", |
... | ... | @@ -260,7 +260,7 @@ |
260 | 260 | |
261 | 261 | piix4_smba = ((smba_en_hi << 8) | smba_en_lo) & 0xffe0; |
262 | 262 | if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) |
263 | - return -EBUSY; | |
263 | + return -ENODEV; | |
264 | 264 | |
265 | 265 | if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) { |
266 | 266 | dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n", |
drivers/i2c/busses/i2c-sis96x.c
... | ... | @@ -280,7 +280,7 @@ |
280 | 280 | |
281 | 281 | retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]); |
282 | 282 | if (retval) |
283 | - return retval; | |
283 | + return -ENODEV; | |
284 | 284 | |
285 | 285 | /* Everything is happy, let's grab the memory and set things up. */ |
286 | 286 | if (!request_region(sis96x_smbus_base, SMB_IOSIZE, |
drivers/i2c/busses/i2c-viapro.c
... | ... | @@ -365,7 +365,7 @@ |
365 | 365 | found: |
366 | 366 | error = acpi_check_region(vt596_smba, 8, vt596_driver.name); |
367 | 367 | if (error) |
368 | - return error; | |
368 | + return -ENODEV; | |
369 | 369 | |
370 | 370 | if (!request_region(vt596_smba, 8, vt596_driver.name)) { |
371 | 371 | dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n", |