diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-03-31 22:50:34 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-05-06 11:06:04 +0900 |
commit | fb7d0e5e1f14e9f0bf743d99b54c4e6637bab098 (patch) | |
tree | 8944492bcde171d1028eb9eed1e4939836a903eb /drivers/firewire | |
parent | d3155742db89df3b3c96da383c400e6ff4d23c25 (diff) | |
download | lwn-fb7d0e5e1f14e9f0bf743d99b54c4e6637bab098.tar.gz lwn-fb7d0e5e1f14e9f0bf743d99b54c4e6637bab098.zip |
Revert "firewire: ohci: use devres for requested IRQ"
This reverts commit 5a95f1ded28691e69f7d6718c5dcbc149613d431.
As long as allocating any device interrupt vector for MSI, it is
inconvenient to utilize managed device resources for IRQ requesting.
Link: https://lore.kernel.org/r/20240331135037.191479-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/ohci.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index b9ae0340b8a7..c1ee16c3b424 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -3758,16 +3758,17 @@ static int pci_probe(struct pci_dev *dev, if (!(ohci->quirks & QUIRK_NO_MSI)) pci_enable_msi(dev); - err = devm_request_irq(&dev->dev, dev->irq, irq_handler, - pci_dev_msi_enabled(dev) ? 0 : IRQF_SHARED, ohci_driver_name, ohci); - if (err < 0) { + if (request_irq(dev->irq, irq_handler, + pci_dev_msi_enabled(dev) ? 0 : IRQF_SHARED, + ohci_driver_name, ohci)) { ohci_err(ohci, "failed to allocate interrupt %d\n", dev->irq); + err = -EIO; goto fail_msi; } err = fw_card_add(&ohci->card, max_receive, link_speed, guid); if (err) - goto fail_msi; + goto fail_irq; version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff; ohci_notice(ohci, @@ -3780,8 +3781,9 @@ static int pci_probe(struct pci_dev *dev, return 0; + fail_irq: + free_irq(dev->irq, ohci); fail_msi: - devm_free_irq(&dev->dev, dev->irq, ohci); pci_disable_msi(dev); return err; @@ -3809,7 +3811,7 @@ static void pci_remove(struct pci_dev *dev) software_reset(ohci); - devm_free_irq(&dev->dev, dev->irq, ohci); + free_irq(dev->irq, ohci); pci_disable_msi(dev); dev_notice(&dev->dev, "removing fw-ohci device\n"); |