From patchwork Wed Apr 27 22:34:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102418 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2446282qge; Wed, 27 Apr 2016 15:40:44 -0700 (PDT) X-Received: by 10.66.218.161 with SMTP id ph1mr15387015pac.83.1461796844422; Wed, 27 Apr 2016 15:40:44 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xz4si7566945pab.139.2016.04.27.15.40.44; Wed, 27 Apr 2016 15:40:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753759AbcD0Wkl (ORCPT + 29 others); Wed, 27 Apr 2016 18:40:41 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:50122 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbcD0Wki (ORCPT ); Wed, 27 Apr 2016 18:40:38 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LalbM-1bOExq3P5c-00kOo4; Thu, 28 Apr 2016 00:34:55 +0200 From: Arnd Bergmann To: Alexandre Belloni Cc: Arnd Bergmann , geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, linux-alpha@vger.kernel.org, a.zummo@towertech.it, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-m68k@lists.linux-m68k.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH v3 14/16] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Date: Thu, 28 Apr 2016 00:34:28 +0200 Message-Id: <1461796470-1291527-15-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de> References: <1461796470-1291527-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:mL1n6P1rOtKtUfy0ODQ8J+s1s2yeLsptxhD9i4ilbE9iKNce4b4 9TVJ6iK/PU54MLXFnTjf57cSMxPde/rvm+Y6U1DTDj92OmYRyHORfa5vgDoLZES11ot/NHd 5KKn9we3gq1sgzeHivOsydktD8OiaD+weO+9VZW4KINzpfb/i7k4zxJ/cJSyu2toYOf4kj0 JQFu5S5tZMhEhvASC923A== X-UI-Out-Filterresults: notjunk:1; V01:K0:r5IBcqExddI=:GwoDvIMjp4UOV7hTO3Pre0 /ulQhDkylqHhBrxGIbLwex7HGUpOOSkVwMYq1RGWysok60MD4NhAW0NyVs3PgDBH0zDSW+vVH JQUFOMl2WAbtofNoZBBvn9l6oJmKBXK6iKUVWydt0aBzmHNOOUGJSPaup6szAgNCpW2Td3t+7 wUWiSNvhzZxDdt7kMx5J7UxxejDU0T692F6gkf7eAju2G62yznwvC/vxD+SrnqCAgnG9pRg53 br/mIvLazQi0BojMw6fnaD59pMYkb5CX8L44dYH+gHJndQU1gJ15p7QhgPEta/e1Qa5E853Ba uRO+lG70DyZeByOHNPLF0KmHJ7fhXp8BfwT7RTYYbQGKsFVswGarAnIv7fffj2XO1lLNdjCIM WNpxrOpcfl1tkSH/FO+PUJpdshjrLoN9In+kue9CqahGak6vsqExdZSBE0wcKBb1OF3G1aALT y7RRMLtkAKn6jAPySjjfDONyI9vjSHI2QP5zFpfd+zNelq7zk8aM28rZV1Nn5zOG8UDHheVcL xhGkFjRGQ0SaUtFs69BFHuaewkh+2C0mceaxoCuS0mAPSaH5CJ8RtjD2sWn3afICXHfSFSOMA 9CGaVaTL4C0sbdDSBZnh4QGCXM75mnd24v7olxuBsVh9wodE3BZj2F9H0M/N+oj8D1+304Cd0 v4QdUbT3yRwh5BRj66jof+anv2RyxMoiH5No7pOV/EaR0FVifTurZCUeu5OfHA++LKeQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All architectures using this driver are now converted to provide their own operations, so this one can be turned into a trivial stub driver relying on its platform data. Signed-off-by: Arnd Bergmann --- drivers/rtc/rtc-generic.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) -- 2.7.0 diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c index efcb9833cac8..1bf5d2347928 100644 --- a/drivers/rtc/rtc-generic.c +++ b/drivers/rtc/rtc-generic.c @@ -9,43 +9,10 @@ #include #include -#if 0 -#include - -static int generic_get_time(struct device *dev, struct rtc_time *tm) -{ - unsigned int ret = get_rtc_time(tm); - - if (ret & RTC_BATT_BAD) - return -EOPNOTSUPP; - - return rtc_valid_tm(tm); -} - -static int generic_set_time(struct device *dev, struct rtc_time *tm) -{ - if (set_rtc_time(tm) < 0) - return -EOPNOTSUPP; - - return 0; -} - -static const struct rtc_class_ops generic_rtc_ops = { - .read_time = generic_get_time, - .set_time = generic_set_time, -}; -#else -#define generic_rtc_ops *(struct rtc_class_ops*)NULL -#endif - static int __init generic_rtc_probe(struct platform_device *dev) { struct rtc_device *rtc; - const struct rtc_class_ops *ops; - - ops = dev_get_platdata(&dev->dev); - if (!ops) - ops = &generic_rtc_ops; + const struct rtc_class_ops *ops = dev_get_platdata(&dev->dev); rtc = devm_rtc_device_register(&dev->dev, "rtc-generic", ops, THIS_MODULE);