Skip to contentSkip to conversation

rt2x00: don't use to_pci_dev in rt2x00pci_uninitialize

PATCH In review Helmut Schaa 2 participants 2 messages May 19, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: don't use to_pci_dev in rt2x00pci_uninitialize

Don't use to_pci_dev in rt2x00pci_uninitialize to get the allocated irq as it won't work for platform devices (SoC). Instead, use the irq field that's already used everywhere else.

---
 drivers/net/wireless/rt2x00/rt2x00pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2x00pci.c +1 -1
index a016f7c..f71eee6 100644
@@ -206,7 +206,7 @@ void rt2x00pci_uninitialize(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Free irq line.
 	 */
-	free_irq(to_pci_dev(rt2x00dev->dev)->irq, rt2x00dev);
+	free_irq(rt2x00dev->irq, rt2x00dev);
 
 	/*
 	 * Free DMA
Signature · 1 line
1.6.4.2
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Helmut Schaa

Don't use to_pci_dev in rt2x00pci_uninitialize to get the allocated irq as it won't work for platform devices (SoC). Instead, use the irq field that's already used everywhere else.

Quoted 21 lines

---
 drivers/net/wireless/rt2x00/rt2x00pci.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2x00pci.c +1 -2
index a016f7c..f71eee6 100644
@@ -206,7 +206,7 @@ void rt2x00pci_uninitialize(struct rt2x00_dev *rt2x00dev)
        /*
         * Free irq line.
         */
-       free_irq(to_pci_dev(rt2x00dev->dev)->irq, rt2x00dev);
+       free_irq(rt2x00dev->irq, rt2x00dev);
 
        /*
         * Free DMA
--

1.6.4.2