diff options
author | Dinh Nguyen <Dinh.Nguyen@freescale.com> | 2010-08-31 14:52:05 -0500 |
---|---|---|
committer | Dinh Nguyen <Dinh.Nguyen@freescale.com> | 2010-09-02 08:48:48 -0500 |
commit | 52b3351407de73e3819b236a0cef983f8ad199e1 (patch) | |
tree | ad2b98891787a1f929e933999a31a5453e66c99a | |
parent | 666c76defcef1bc2a66ec18c93bd78fe434376c9 (diff) |
ENGR00126931: Remove irq define dependency in vpu, kpp, and nand
vpu: free the IRQ in the remove function and remove the MXC_INT_VPU
define dependency.
kpp: remove MXC_INT_KPP define dependency
nand: remove the MXC_INT_NANDFC define dependency
Acked-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
-rw-r--r-- | drivers/input/keyboard/mxc_keyb.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/mxc_nd2.c | 6 | ||||
-rw-r--r-- | drivers/mxc/vpu/mxc_vpu.c | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/input/keyboard/mxc_keyb.c b/drivers/input/keyboard/mxc_keyb.c index 033713cbdfdf..bd5ecd8c20f1 100644 --- a/drivers/input/keyboard/mxc_keyb.c +++ b/drivers/input/keyboard/mxc_keyb.c @@ -1077,7 +1077,7 @@ static int mxc_kpp_probe(struct platform_device *pdev) retval = request_irq(irq, mxc_kpp_interrupt, 0, MOD_NAME, MOD_NAME); if (retval) { pr_debug("KPP: request_irq(%d) returned error %d\n", - MXC_INT_KPP, retval); + irq, retval); goto err3; } diff --git a/drivers/mtd/nand/mxc_nd2.c b/drivers/mtd/nand/mxc_nd2.c index 23fc09504d09..374e528d96ba 100644 --- a/drivers/mtd/nand/mxc_nd2.c +++ b/drivers/mtd/nand/mxc_nd2.c @@ -32,6 +32,7 @@ /* Global address Variables */ static void __iomem *nfc_axi_base, *nfc_ip_base; +static int nfc_irq; struct mxc_mtd_s { struct mtd_info mtd; @@ -1193,9 +1194,10 @@ static int mxc_get_resources(struct platform_device *pdev) error = -ENXIO; goto out_2; } + nfc_irq = r->start; init_waitqueue_head(&irq_waitq); - error = request_irq(r->start, mxc_nfc_irq, 0, "mxc_nd", NULL); + error = request_irq(nfc_irq, mxc_nfc_irq, 0, "mxc_nd", NULL); if (error) goto out_3; @@ -1553,7 +1555,7 @@ static int __exit mxcnd_remove(struct platform_device *pdev) if (mxc_nand_data) { nand_release(mtd); - free_irq(MXC_INT_NANDFC, NULL); + free_irq(nfc_irq, NULL); kfree(mxc_nand_data); } diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c index f62e3d46a67c..8de558f73f9a 100644 --- a/drivers/mxc/vpu/mxc_vpu.c +++ b/drivers/mxc/vpu/mxc_vpu.c @@ -73,6 +73,7 @@ static struct vpu_mem_desc user_data_mem = { 0 }; static struct vpu_mem_desc share_mem = { 0 }; static void __iomem *vpu_base; +static int vpu_irq; static u32 phy_vpu_base_addr; static struct mxc_vpu_platform_data *vpu_plat; @@ -635,8 +636,9 @@ static int vpu_dev_probe(struct platform_device *pdev) err = -ENXIO; goto err_out_class; } + vpu_irq = res->start; - err = request_irq(res->start, vpu_irq_handler, 0, "VPU_CODEC_IRQ", + err = request_irq(vpu_irq, vpu_irq_handler, 0, "VPU_CODEC_IRQ", (void *)(&vpu_data)); if (err) goto err_out_class; @@ -660,6 +662,7 @@ static int vpu_dev_probe(struct platform_device *pdev) static int vpu_dev_remove(struct platform_device *pdev) { + free_irq(vpu_irq, &vpu_data); iounmap(vpu_base); iram_free(iram.start, VPU_IRAM_SIZE); @@ -828,7 +831,6 @@ static int __init vpu_init(void) static void __exit vpu_exit(void) { - free_irq(MXC_INT_VPU, (void *)(&vpu_data)); if (vpu_major > 0) { device_destroy(vpu_class, MKDEV(vpu_major, 0)); class_destroy(vpu_class); |