From patchwork Wed Feb 16 19:42:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 568271 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1GJgqiG028975 for ; Wed, 16 Feb 2011 19:42:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422Ab1BPTmw (ORCPT ); Wed, 16 Feb 2011 14:42:52 -0500 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:47736 "EHLO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753907Ab1BPTmu (ORCPT ); Wed, 16 Feb 2011 14:42:50 -0500 Received: from source ([209.85.214.43]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTVwouTzLArsiepZMoUBUBe7cLK0tLyMo@postini.com; Wed, 16 Feb 2011 11:42:50 PST Received: by mail-bw0-f43.google.com with SMTP id 14so1971318bwz.2 for ; Wed, 16 Feb 2011 11:42:49 -0800 (PST) Received: by 10.204.58.135 with SMTP id g7mr820443bkh.187.1297885369608; Wed, 16 Feb 2011 11:42:49 -0800 (PST) Received: from localhost (cs181221087.pp.htv.fi [82.181.221.87]) by mx.google.com with ESMTPS id a17sm78055bku.23.2011.02.16.11.42.48 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Feb 2011 11:42:48 -0800 (PST) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Felipe Balbi Subject: [PATCH 5/6] cbus: retu: tabify retu initialization Date: Wed, 16 Feb 2011 21:42:29 +0200 Message-Id: <1297885350-3462-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.4.rc2 In-Reply-To: <1297885350-3462-1-git-send-email-balbi@ti.com> References: <1297885350-3462-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 16 Feb 2011 19:42:53 +0000 (UTC) diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c index 4c8a7ea..d0454bd 100644 --- a/drivers/cbus/retu.c +++ b/drivers/cbus/retu.c @@ -438,7 +438,6 @@ static int __init retu_probe(struct platform_device *pdev) int ret = -ENOMEM; int rev; - int irq; retu = kzalloc(sizeof(*retu), GFP_KERNEL); if (!retu) { @@ -447,16 +446,14 @@ static int __init retu_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, retu); - the_retu = retu; - mutex_init(&retu->mutex); - - irq = platform_get_irq(pdev, 0); + retu->irq = platform_get_irq(pdev, 0); + retu->irq_base = pdata->irq_base; + retu->irq_end = pdata->irq_end; + retu->devid = pdata->devid; + the_retu = retu; - retu->irq = irq; - retu->irq_base = pdata->irq_base; - retu->irq_end = pdata->irq_end; - retu->devid = pdata->devid; + mutex_init(&retu->mutex); retu_irq_init(retu); @@ -471,14 +468,14 @@ static int __init retu_probe(struct platform_device *pdev) /* Mask all RETU interrupts */ __retu_write_reg(retu, RETU_REG_IMR, 0xffff); - ret = request_threaded_irq(irq, NULL, retu_irq_handler, 0, + ret = request_threaded_irq(retu->irq, NULL, retu_irq_handler, 0, "retu", retu); if (ret < 0) { dev_err(&pdev->dev, "Unable to register IRQ handler\n"); goto err1; } - set_irq_wake(irq, 1); + set_irq_wake(retu->irq, 1); /* Register power off function */ pm_power_off = retu_power_off; @@ -493,7 +490,7 @@ static int __init retu_probe(struct platform_device *pdev) err2: __retu_write_reg(retu, RETU_REG_IMR, 0xffff); - free_irq(irq, retu); + free_irq(retu->irq, retu); err1: kfree(retu); @@ -506,13 +503,13 @@ err0: static int __exit retu_remove(struct platform_device *pdev) { struct retu *retu = platform_get_drvdata(pdev); - int irq; irq = platform_get_irq(pdev, 0); /* Mask all RETU interrupts */ __retu_write_reg(retu, RETU_REG_IMR, 0xffff); - free_irq(irq, retu); + + free_irq(retu->irq, retu); retu_irq_exit(retu); kfree(retu); the_retu = NULL;