aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-08-26 00:04:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-28 00:49:26 -0400
commitef22d576dd9d028dba53476bbcfc36aa1b5d768b (patch)
tree7b17f2ce1075f8fc33f4c2c449e48dd35e24b156
parent6d6dfb4f4aa9ee352a199b5379942350bdd26e64 (diff)
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/vme/bridges/vme_ca91cx42.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index 53a3f6aaf1db..f8448573d030 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -243,6 +243,8 @@ static int ca91cx42_irq_init(struct vme_bridge *ca91cx42_bridge)
243static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge, 243static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge,
244 struct pci_dev *pdev) 244 struct pci_dev *pdev)
245{ 245{
246 struct vme_bridge *ca91cx42_bridge;
247
246 /* Disable interrupts from PCI to VME */ 248 /* Disable interrupts from PCI to VME */
247 iowrite32(0, bridge->base + VINT_EN); 249 iowrite32(0, bridge->base + VINT_EN);
248 250
@@ -251,7 +253,9 @@ static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge,
251 /* Clear Any Pending PCI Interrupts */ 253 /* Clear Any Pending PCI Interrupts */
252 iowrite32(0x00FFFFFF, bridge->base + LINT_STAT); 254 iowrite32(0x00FFFFFF, bridge->base + LINT_STAT);
253 255
254 free_irq(pdev->irq, pdev); 256 ca91cx42_bridge = container_of((void *)bridge, struct vme_bridge,
257 driver_priv);
258 free_irq(pdev->irq, ca91cx42_bridge);
255} 259}
256 260
257static int ca91cx42_iack_received(struct ca91cx42_driver *bridge, int level) 261static int ca91cx42_iack_received(struct ca91cx42_driver *bridge, int level)