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: 8963631 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 739DCBF440 for ; Wed, 27 Apr 2016 22:40:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC1B420219 for ; Wed, 27 Apr 2016 22:40:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD0D2201F5 for ; Wed, 27 Apr 2016 22:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753826AbcD0Wkl (ORCPT ); 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-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);