Commit ef22d576 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6d6dfb4f
...@@ -243,6 +243,8 @@ static int ca91cx42_irq_init(struct vme_bridge *ca91cx42_bridge) ...@@ -243,6 +243,8 @@ static int ca91cx42_irq_init(struct vme_bridge *ca91cx42_bridge)
static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge, static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge,
struct pci_dev *pdev) struct pci_dev *pdev)
{ {
struct vme_bridge *ca91cx42_bridge;
/* Disable interrupts from PCI to VME */ /* Disable interrupts from PCI to VME */
iowrite32(0, bridge->base + VINT_EN); iowrite32(0, bridge->base + VINT_EN);
...@@ -251,7 +253,9 @@ static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge, ...@@ -251,7 +253,9 @@ static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge,
/* Clear Any Pending PCI Interrupts */ /* Clear Any Pending PCI Interrupts */
iowrite32(0x00FFFFFF, bridge->base + LINT_STAT); iowrite32(0x00FFFFFF, bridge->base + LINT_STAT);
free_irq(pdev->irq, pdev); ca91cx42_bridge = container_of((void *)bridge, struct vme_bridge,
driver_priv);
free_irq(pdev->irq, ca91cx42_bridge);
} }
static int ca91cx42_iack_received(struct ca91cx42_driver *bridge, int level) static int ca91cx42_iack_received(struct ca91cx42_driver *bridge, int level)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment