irda: sh_irda: use devm_request_irq()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 8 Jan 2014 04:54:55 +0000 (20:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jan 2014 03:57:13 +0000 (22:57 -0500)
Huqiu reported current sh_irda driver doesn't
call free_irq() in spite of using request_irq().
This patch replaces request_irq() into devm_request_irq()
to solve this issue

Reported-by: Huqiu Liu<huqiuliu@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/sh_irda.c

index ff45cd0d60e84f88b5e34ec40f61e2e5e0d85eb3..c96b46b2c3a8db6452bd68c7750613514102340b 100644 (file)
@@ -804,7 +804,7 @@ static int sh_irda_probe(struct platform_device *pdev)
                goto err_mem_4;
 
        platform_set_drvdata(pdev, ndev);
-       err = request_irq(irq, sh_irda_irq, 0, "sh_irda", self);
+       err = devm_request_irq(&pdev->dev, irq, sh_irda_irq, 0, "sh_irda", self);
        if (err) {
                dev_warn(&pdev->dev, "Unable to attach sh_irda interrupt\n");
                goto err_mem_4;