提交 ae944717 编写于 作者: J Jean Delvare 提交者: Wolfram Sang

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: NJean Delvare <jdelvare@suse.de>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 b3b8df97
...@@ -1239,10 +1239,11 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1239,10 +1239,11 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (err) { if (err) {
dev_err(&dev->dev, "Failed to allocate irq %d: %d\n", dev_err(&dev->dev, "Failed to allocate irq %d: %d\n",
dev->irq, err); 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 */ /* set up the sysfs linkage to our parent device */
priv->adapter.dev.parent = &dev->dev; priv->adapter.dev.parent = &dev->dev;
...@@ -1269,7 +1270,6 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1269,7 +1270,6 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
exit_free_irq: exit_free_irq:
if (priv->features & FEATURE_IRQ) if (priv->features & FEATURE_IRQ)
free_irq(dev->irq, priv); free_irq(dev->irq, priv);
exit_release:
pci_release_region(dev, SMBBAR); pci_release_region(dev, SMBBAR);
exit: exit:
kfree(priv); kfree(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册