From patchwork Tue Mar 4 09:01:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 3759991 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B1E839F376 for ; Tue, 4 Mar 2014 09:08:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DBF53203B6 for ; Tue, 4 Mar 2014 09:08:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02E692039E for ; Tue, 4 Mar 2014 09:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756507AbaCDJI2 (ORCPT ); Tue, 4 Mar 2014 04:08:28 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:56590 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752195AbaCDJCf (ORCPT ); Tue, 4 Mar 2014 04:02:35 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s24921Qw026455; Tue, 4 Mar 2014 03:02:01 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s249216l031317; Tue, 4 Mar 2014 03:02:01 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Tue, 4 Mar 2014 03:02:01 -0600 Received: from dflp33.itg.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2491qMv007616; Tue, 4 Mar 2014 03:01:59 -0600 From: Peter Ujfalusi To: Santosh Shilimkar , Tony Lindgren CC: Olof Johansson , Arnd Bergmann , , , Subject: [PATCH 3/5] drivers: bus: omap_l3: Convert to use devm_request_irq() Date: Tue, 4 Mar 2014 11:01:48 +0200 Message-ID: <1393923710-10377-4-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393923710-10377-1-git-send-email-peter.ujfalusi@ti.com> References: <1393923710-10377-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With this we can remove the free_irq() calls from probe and remove. Signed-off-by: Peter Ujfalusi Reviewed-by: Santosh Shilimkar --- drivers/bus/omap_l3_noc.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index ca95d3db5055..2bbc87bdea2b 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c @@ -159,9 +159,8 @@ static int omap4_l3_probe(struct platform_device *pdev) * Setup interrupt Handlers */ l3->debug_irq = platform_get_irq(pdev, 0); - ret = request_irq(l3->debug_irq, - l3_interrupt_handler, - IRQF_DISABLED, "l3-dbg-irq", l3); + ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler, + IRQF_DISABLED, "l3-dbg-irq", l3); if (ret) { pr_crit("L3: request_irq failed to register for 0x%x\n", l3->debug_irq); @@ -169,29 +168,17 @@ static int omap4_l3_probe(struct platform_device *pdev) } l3->app_irq = platform_get_irq(pdev, 1); - ret = request_irq(l3->app_irq, - l3_interrupt_handler, - IRQF_DISABLED, "l3-app-irq", l3); - if (ret) { + ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler, + IRQF_DISABLED, "l3-app-irq", l3); + if (ret) pr_crit("L3: request_irq failed to register for 0x%x\n", l3->app_irq); - goto err4; - } - - return 0; -err4: - free_irq(l3->debug_irq, l3); return ret; } static int omap4_l3_remove(struct platform_device *pdev) { - struct omap4_l3 *l3 = platform_get_drvdata(pdev); - - free_irq(l3->app_irq, l3); - free_irq(l3->debug_irq, l3); - return 0; }