diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-11-12 10:24:07 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-11-12 16:26:32 +0100 |
commit | ae9447171748180d4e946839c5eed6123f07f943 (patch) | |
tree | 81c59814e9f22eb01626ec7d4a8e0558405f2987 /drivers/i2c/busses/i2c-i801.c | |
parent | b3b8df97723d84c826d7419bf727a711a4efa068 (diff) | |
download | blackbird-obmc-linux-ae9447171748180d4e946839c5eed6123f07f943.tar.gz blackbird-obmc-linux-ae9447171748180d4e946839c5eed6123f07f943.zip |
i2c: i801: Fallback to polling if request_irq() fails
The i2c-i801 driver can work without interrupts, so there is no reason
to make a request_irq failure fatal. Instead we can simply fallback
to polling.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-i801.c')
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 67661bbcbdd3..a6f3bc38fbe5 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1239,10 +1239,11 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) if (err) { dev_err(&dev->dev, "Failed to allocate irq %d: %d\n", dev->irq, err); - goto exit_release; + priv->features &= ~FEATURE_IRQ; } - dev_info(&dev->dev, "SMBus using PCI Interrupt\n"); } + dev_info(&dev->dev, "SMBus using %s\n", + priv->features & FEATURE_IRQ ? "PCI interrupt" : "polling"); /* set up the sysfs linkage to our parent device */ priv->adapter.dev.parent = &dev->dev; @@ -1269,7 +1270,6 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) exit_free_irq: if (priv->features & FEATURE_IRQ) free_irq(dev->irq, priv); -exit_release: pci_release_region(dev, SMBBAR); exit: kfree(priv); |