From patchwork Wed Mar 5 19:29:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 327133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yh0-x23b.google.com (mail-yh0-x23b.google.com [IPv6:2607:f8b0:4002:c01::23b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 81E952C00C2 for ; Thu, 6 Mar 2014 06:32:29 +1100 (EST) Received: by mail-yh0-f59.google.com with SMTP id z6sf341613yhz.24 for ; Wed, 05 Mar 2014 11:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=JOmVct0rS9b/B0qOUXkunSYkIVAEp98VK06FaeH1O9I=; b=saTnDDMZ/3Gf1eG7Zr0XNUbz5UAs9gsP0VY2gtDF9k2PE9xyoh/f0/U3WiVf3ncdM6 X4UVfq5QNn1YLuAPH+JQIGia2g7zJWE7CM653M6kOEtivwG0BOg/rj3cpnDwXKCZ7svL hGG6mqRptnapKSia0Bky95khl43xAVCMYLs+zBIEF8mPipp/CaMxeplYcQmKGhgUKCj7 +TP3pdkiOPeIR0uajti7SBEtn0pUDarn2bOr8sTy436jn33ClKFWhQjLa1HMmHafVXi7 PJu28yH+MIr1ODnlShj0p9k7dbrVoUjsJG4uIS59xwYDVxQF+IQ9M8Yt3GuveAuAgWWv WPYg== X-Received: by 10.50.126.39 with SMTP id mv7mr523576igb.15.1394047946114; Wed, 05 Mar 2014 11:32:26 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.43.135 with SMTP id w7ls3597216igl.14.canary; Wed, 05 Mar 2014 11:32:25 -0800 (PST) X-Received: by 10.66.149.67 with SMTP id ty3mr3261799pab.27.1394047945521; Wed, 05 Mar 2014 11:32:25 -0800 (PST) Received: from smtp.codeaurora.org (smtp.codeaurora.org. [198.145.11.231]) by gmr-mx.google.com with ESMTPS id pt3si1324037pac.0.2014.03.05.11.32.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Mar 2014 11:32:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of joshc@codeaurora.org designates 198.145.11.231 as permitted sender) client-ip=198.145.11.231; Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 4AB0D13F129; Wed, 5 Mar 2014 19:32:25 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 3C4E413F12A; Wed, 5 Mar 2014 19:32:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-caf-smtp.dmz.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 Received: from joshc.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: joshc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E100B13EF20; Wed, 5 Mar 2014 19:32:24 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id 6DEBF6354F; Wed, 5 Mar 2014 13:29:37 -0600 (CST) From: Josh Cartwright To: Alessandro Zummo Cc: linux-arm-msm@vger.kernel.org, Stephen Boyd , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [rtc-linux] [PATCH 3/6] rtc: pm8xxx: use devm_request_any_context_irq Date: Wed, 5 Mar 2014 13:29:33 -0600 Message-Id: <1394047776-13827-4-git-send-email-joshc@codeaurora.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394047776-13827-1-git-send-email-joshc@codeaurora.org> References: <1394047776-13827-1-git-send-email-joshc@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-Original-Sender: joshc@codeaurora.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of joshc@codeaurora.org designates 198.145.11.231 as permitted sender) smtp.mail=joshc@codeaurora.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Make use of the devm_* variant of request_any_context_irq to allow for elimination of remove(). Signed-off-by: Josh Cartwright Reviewed-by: Stephen Boyd --- drivers/rtc/rtc-pm8xxx.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index f6d140a..ed3fe83 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -427,9 +427,10 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) } /* Request the alarm IRQ */ - rc = request_any_context_irq(rtc_dd->rtc_alarm_irq, - pm8xxx_alarm_trigger, IRQF_TRIGGER_RISING, - "pm8xxx_rtc_alarm", rtc_dd); + rc = devm_request_any_context_irq(&pdev->dev, rtc_dd->rtc_alarm_irq, + pm8xxx_alarm_trigger, + IRQF_TRIGGER_RISING, + "pm8xxx_rtc_alarm", rtc_dd); if (rc < 0) { dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc); return rc; @@ -442,16 +443,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) return 0; } -static int pm8xxx_rtc_remove(struct platform_device *pdev) -{ - struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev); - - device_init_wakeup(&pdev->dev, 0); - free_irq(rtc_dd->rtc_alarm_irq, rtc_dd); - - return 0; -} - #ifdef CONFIG_PM_SLEEP static int pm8xxx_rtc_resume(struct device *dev) { @@ -480,7 +471,6 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops, static struct platform_driver pm8xxx_rtc_driver = { .probe = pm8xxx_rtc_probe, - .remove = pm8xxx_rtc_remove, .driver = { .name = PM8XXX_RTC_DEV_NAME, .owner = THIS_MODULE,