From patchwork Mon Mar 10 18:44:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 328698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-qa0-x238.google.com (mail-qa0-x238.google.com [IPv6:2607:f8b0:400d:c00::238]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 881D92C00C3 for ; Tue, 11 Mar 2014 05:47:51 +1100 (EST) Received: by mail-qa0-f56.google.com with SMTP id cm18sf1737396qab.21 for ; Mon, 10 Mar 2014 11:47:46 -0700 (PDT) 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=DDQBlhohv2RYS9CzCw1CZ8oxhinWehUGXb50ce0hMvI=; b=DhoE+niRARUTu7cwzCwrWvLvgHkuLznE69Zg4UYiyv7cP8ZoYZ+2gaMVWULjglG9ot kw9eKOxOfzSw2VWacRLY6LO5nMMD20G60hrV3PoD4DMU2NDDabEihzc+qJhxqXs0gC93 jpk6LU4E/aY4MNVjf8Rz47l3loCgaUtzEukAVG971A9YNE0v1GH4Rfku7RoVzb4/wllQ CfFUN2zw7nPZd/1WtvNKBFtQP69BT/v4dz4KLZazAVS6qywa1wnbA+QaaRcT1k/A+LS3 aNKnBNRmLuCrsHhF6exxjELSCSonID0l6lLvDQkBbXLudOAKKX55KoavXefTLEegAdUR Mw5g== X-Received: by 10.50.47.48 with SMTP id a16mr346504ign.6.1394477265993; Mon, 10 Mar 2014 11:47:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.106.101 with SMTP id gt5ls2602228igb.40.gmail; Mon, 10 Mar 2014 11:47:45 -0700 (PDT) X-Received: by 10.66.52.80 with SMTP id r16mr13990655pao.15.1394477265582; Mon, 10 Mar 2014 11:47:45 -0700 (PDT) Received: from smtp.codeaurora.org (smtp.codeaurora.org. [198.145.11.231]) by gmr-mx.google.com with ESMTPS id g1si3629366pbw.2.2014.03.10.11.47.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Mar 2014 11:47:45 -0700 (PDT) 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 24EE813EEFD; Mon, 10 Mar 2014 18:47:45 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 157AC13F1FD; Mon, 10 Mar 2014 18:47:45 +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 B2CB113F14D; Mon, 10 Mar 2014 18:47:44 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id CD9D26354E; Mon, 10 Mar 2014 13:44:49 -0500 (CDT) From: Josh Cartwright To: Andrew Morton , Alessandro Zummo Cc: linux-arm-msm@vger.kernel.org, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [rtc-linux] [PATCH v2 3/6] rtc: pm8xxx: use devm_request_any_context_irq Date: Mon, 10 Mar 2014 13:44:46 -0500 Message-Id: <1394477089-3996-4-git-send-email-joshc@codeaurora.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394477089-3996-1-git-send-email-joshc@codeaurora.org> References: <1394477089-3996-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 cdc9dc2..91ac2e3 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -434,9 +434,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; @@ -449,16 +450,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) { @@ -487,7 +478,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,