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: 3805211 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55995BF540 for ; Mon, 10 Mar 2014 18:47:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 548692021E for ; Mon, 10 Mar 2014 18:47:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 513F3202AE for ; Mon, 10 Mar 2014 18:47:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbaCJSrq (ORCPT ); Mon, 10 Mar 2014 14:47:46 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:37163 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbaCJSrp (ORCPT ); Mon, 10 Mar 2014 14:47:45 -0400 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 mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY 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: [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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,