From patchwork Wed Jan 25 08:41:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 92406 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2111964qgi; Wed, 25 Jan 2017 00:56:23 -0800 (PST) X-Received: by 10.200.51.6 with SMTP id t6mr31471850qta.75.1485334583536; Wed, 25 Jan 2017 00:56:23 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id u3si15039533qkc.216.2017.01.25.00.56.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 00:56:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWJNN-00055m-UM; Wed, 25 Jan 2017 08:56:21 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWJE7-0008Rt-9e for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2017 08:46:52 +0000 Received: from 172.24.1.36 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.36]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DTT86994; Wed, 25 Jan 2017 16:45:40 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Wed, 25 Jan 2017 16:45:28 +0800 From: Kefeng Wang To: Hans Ulli Kroll , Alessandro Zummo , Alexandre Belloni , Patrice Chotard , Maxime Ripard , Chen-Yu Tsai , , Subject: [PATCH 1/4] rtc: gemini: using devm_rtc_device_register helper Date: Wed, 25 Jan 2017 16:41:54 +0800 Message-ID: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.588865B6.00FA, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 144313af9fab65e25dd6568c9e3fab05 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170125_004647_722709_CEE9A39F X-CRM114-Status: GOOD ( 11.75 ) X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [119.145.14.65 listed in list.dnswl.org] 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Using devm_rtc_device_register() helper to simplify code. Cc: Hans Ulli Kroll Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Kefeng Wang --- drivers/rtc/rtc-gemini.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 1.7.12.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c index 688debc..504b6c1 100644 --- a/drivers/rtc/rtc-gemini.c +++ b/drivers/rtc/rtc-gemini.c @@ -145,26 +145,16 @@ static int gemini_rtc_probe(struct platform_device *pdev) if (unlikely(ret)) return ret; - rtc->rtc_dev = rtc_device_register(pdev->name, dev, - &gemini_rtc_ops, THIS_MODULE); + rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &gemini_rtc_ops, + THIS_MODULE); return PTR_ERR_OR_ZERO(rtc->rtc_dev); } -static int gemini_rtc_remove(struct platform_device *pdev) -{ - struct gemini_rtc *rtc = platform_get_drvdata(pdev); - - rtc_device_unregister(rtc->rtc_dev); - - return 0; -} - static struct platform_driver gemini_rtc_driver = { .driver = { .name = DRV_NAME, }, .probe = gemini_rtc_probe, - .remove = gemini_rtc_remove, }; module_platform_driver_probe(gemini_rtc_driver, gemini_rtc_probe); From patchwork Wed Jan 25 08:41:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 92403 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2109532qgi; Wed, 25 Jan 2017 00:47:34 -0800 (PST) X-Received: by 10.200.35.105 with SMTP id b38mr31317832qtb.1.1485334054291; Wed, 25 Jan 2017 00:47:34 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id m3si11155539qkc.39.2017.01.25.00.47.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 00:47:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWJEq-0000OS-RU; Wed, 25 Jan 2017 08:47:32 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWJE7-0008Rs-KF for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2017 08:46:57 +0000 Received: from 172.24.1.36 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.36]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DTT87003; Wed, 25 Jan 2017 16:45:41 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Wed, 25 Jan 2017 16:45:28 +0800 From: Kefeng Wang To: Hans Ulli Kroll , Alessandro Zummo , Alexandre Belloni , Patrice Chotard , Maxime Ripard , Chen-Yu Tsai , , Subject: [PATCH 2/4] rtc: st-lpc: using devm_rtc_device_register helper Date: Wed, 25 Jan 2017 16:41:55 +0800 Message-ID: <1485333717-47536-2-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> References: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.588865B6.00F8, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2d611cb9701b445d450d9051eba1dcd9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170125_004648_054469_62B6CFA6 X-CRM114-Status: GOOD ( 11.53 ) X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [119.145.14.65 listed in list.dnswl.org] 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Using devm_rtc_device_register() helper to simplify code. Cc: Patrice Chotard Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Kefeng Wang --- drivers/rtc/rtc-st-lpc.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 1.7.12.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 74c0a33..4f81124 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c @@ -272,8 +272,8 @@ static int st_rtc_probe(struct platform_device *pdev) st_rtc_set_time(&pdev->dev, &tm_check); } - rtc->rtc_dev = rtc_device_register("st-lpc-rtc", &pdev->dev, - &st_rtc_ops, THIS_MODULE); + rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "st-lpc-rtc", + &st_rtc_ops, THIS_MODULE); if (IS_ERR(rtc->rtc_dev)) { clk_disable_unprepare(rtc->clk); return PTR_ERR(rtc->rtc_dev); @@ -282,16 +282,6 @@ static int st_rtc_probe(struct platform_device *pdev) return 0; } -static int st_rtc_remove(struct platform_device *pdev) -{ - struct st_rtc *rtc = platform_get_drvdata(pdev); - - if (likely(rtc->rtc_dev)) - rtc_device_unregister(rtc->rtc_dev); - - return 0; -} - #ifdef CONFIG_PM_SLEEP static int st_rtc_suspend(struct device *dev) { @@ -344,7 +334,6 @@ static int st_rtc_resume(struct device *dev) .of_match_table = st_rtc_match, }, .probe = st_rtc_probe, - .remove = st_rtc_remove, }; module_platform_driver(st_rtc_platform_driver); From patchwork Wed Jan 25 08:41:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 92404 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2109571qgi; Wed, 25 Jan 2017 00:47:42 -0800 (PST) X-Received: by 10.237.41.99 with SMTP id s90mr34232940qtd.4.1485334062672; Wed, 25 Jan 2017 00:47:42 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id d192si15030756qka.304.2017.01.25.00.47.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 00:47:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWJEx-0000mE-Sn; Wed, 25 Jan 2017 08:47:39 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWJE8-0008Ru-JL for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2017 08:46:57 +0000 Received: from 172.24.1.36 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.36]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DTT86999; Wed, 25 Jan 2017 16:45:41 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Wed, 25 Jan 2017 16:45:29 +0800 From: Kefeng Wang To: Hans Ulli Kroll , Alessandro Zummo , Alexandre Belloni , Patrice Chotard , Maxime Ripard , Chen-Yu Tsai , , Subject: [PATCH 3/4] rtc: sun6i: using devm_rtc_device_register helper Date: Wed, 25 Jan 2017 16:41:56 +0800 Message-ID: <1485333717-47536-3-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> References: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.588865B7.02E1, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 47401f4ad12277e55bc7604745d6b24e X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170125_004649_021331_4F1AAE72 X-CRM114-Status: GOOD ( 12.80 ) X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [119.145.14.65 listed in list.dnswl.org] 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Using devm_rtc_device_register() helper to simplify code. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Kefeng Wang --- drivers/rtc/rtc-sun6i.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 1.7.12.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c index c169a2c..b22d5eb 100644 --- a/drivers/rtc/rtc-sun6i.c +++ b/drivers/rtc/rtc-sun6i.c @@ -404,8 +404,8 @@ static int sun6i_rtc_probe(struct platform_device *pdev) /* disable alarm wakeup */ writel(0, chip->base + SUN6I_ALARM_CONFIG); - chip->rtc = rtc_device_register("rtc-sun6i", &pdev->dev, - &sun6i_rtc_ops, THIS_MODULE); + chip->rtc = devm_rtc_device_register(&pdev->dev, "rtc-sun6i", + &sun6i_rtc_ops, THIS_MODULE); if (IS_ERR(chip->rtc)) { dev_err(&pdev->dev, "unable to register device\n"); return PTR_ERR(chip->rtc); @@ -416,15 +416,6 @@ static int sun6i_rtc_probe(struct platform_device *pdev) return 0; } -static int sun6i_rtc_remove(struct platform_device *pdev) -{ - struct sun6i_rtc_dev *chip = platform_get_drvdata(pdev); - - rtc_device_unregister(chip->rtc); - - return 0; -} - static const struct of_device_id sun6i_rtc_dt_ids[] = { { .compatible = "allwinner,sun6i-a31-rtc" }, { /* sentinel */ }, @@ -433,7 +424,6 @@ static int sun6i_rtc_remove(struct platform_device *pdev) static struct platform_driver sun6i_rtc_driver = { .probe = sun6i_rtc_probe, - .remove = sun6i_rtc_remove, .driver = { .name = "sun6i-rtc", .of_match_table = sun6i_rtc_dt_ids, From patchwork Wed Jan 25 08:41:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 92407 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2112077qgi; Wed, 25 Jan 2017 00:56:54 -0800 (PST) X-Received: by 10.200.44.243 with SMTP id 48mr19331067qtx.262.1485334614398; Wed, 25 Jan 2017 00:56:54 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id m29si15032503qki.224.2017.01.25.00.56.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 00:56:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWJNs-0005SV-6M; Wed, 25 Jan 2017 08:56:52 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWJE6-0008Rr-SI for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2017 08:46:52 +0000 Received: from 172.24.1.36 (EHLO szxeml426-hub.china.huawei.com) ([172.24.1.36]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DTT87001; Wed, 25 Jan 2017 16:45:41 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.235.1; Wed, 25 Jan 2017 16:45:30 +0800 From: Kefeng Wang To: Hans Ulli Kroll , Alessandro Zummo , Alexandre Belloni , Patrice Chotard , Maxime Ripard , Chen-Yu Tsai , , Subject: [PATCH 4/4] rtc: sunxi: using devm_rtc_device_register helper Date: Wed, 25 Jan 2017 16:41:57 +0800 Message-ID: <1485333717-47536-4-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> References: <1485333717-47536-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.588865B7.02DB, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6046decfe2f36462a2b73981b8598e65 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170125_004647_705694_23C47586 X-CRM114-Status: GOOD ( 12.20 ) X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [119.145.14.65 listed in list.dnswl.org] 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Using devm_rtc_device_register() helper to simplify code. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Kefeng Wang --- drivers/rtc/rtc-sunxi.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) -- 1.7.12.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c index abada60..6fba5ae 100644 --- a/drivers/rtc/rtc-sunxi.c +++ b/drivers/rtc/rtc-sunxi.c @@ -481,8 +481,8 @@ static int sunxi_rtc_probe(struct platform_device *pdev) writel(SUNXI_ALRM_IRQ_STA_CNT_IRQ_PEND, chip->base + SUNXI_ALRM_IRQ_STA); - chip->rtc = rtc_device_register("rtc-sunxi", &pdev->dev, - &sunxi_rtc_ops, THIS_MODULE); + chip->rtc = devm_rtc_device_register(&pdev->dev, "rtc-sunxi", + &sunxi_rtc_ops, THIS_MODULE); if (IS_ERR(chip->rtc)) { dev_err(&pdev->dev, "unable to register device\n"); return PTR_ERR(chip->rtc); @@ -493,18 +493,8 @@ static int sunxi_rtc_probe(struct platform_device *pdev) return 0; } -static int sunxi_rtc_remove(struct platform_device *pdev) -{ - struct sunxi_rtc_dev *chip = platform_get_drvdata(pdev); - - rtc_device_unregister(chip->rtc); - - return 0; -} - static struct platform_driver sunxi_rtc_driver = { .probe = sunxi_rtc_probe, - .remove = sunxi_rtc_remove, .driver = { .name = "sunxi-rtc", .of_match_table = sunxi_rtc_dt_ids,