From patchwork Tue Apr 26 21:52:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8946281 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8DDB09F54E for ; Tue, 26 Apr 2016 21:54:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4F6D2011E for ; Tue, 26 Apr 2016 21:54:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D15BA201EF for ; Tue, 26 Apr 2016 21:54:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753083AbcDZVxh (ORCPT ); Tue, 26 Apr 2016 17:53:37 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:55356 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753304AbcDZVxf (ORCPT ); Tue, 26 Apr 2016 17:53:35 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MZfLS-1b8rlz0vh0-00LWKe; Tue, 26 Apr 2016 23:52:45 +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 v2 6/6] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Date: Tue, 26 Apr 2016 23:52:31 +0200 Message-Id: <1461707551-1337971-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707551-1337971-1-git-send-email-arnd@arndb.de> References: <1461707551-1337971-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:xSq1apOFai+E8rPcQ2vsGmssfzkD3EPj5d7fz21wqQDmd5QQxfm /lNc3Kia39EiZ2SQjTyhUhp7OsHzTw0urlHoLC9qP5IkS6pfCUKzHMttxkymCbgEcmam2LV S7VRZ0nZU5a8RX2zTfKfI8GtGUyu4gEhx10pvxyIAg9gaOag8MwK5oS7TSz63cPIpALuVW/ gfUkEjpA5Llk1Z5h/lWRg== X-UI-Out-Filterresults: notjunk:1; V01:K0:6KiIxAL+yE0=:GB4FWe+tOWAbvD3yXws+Uk SRiTEOPMxqwS9bAf1HMX7ZAH9S8/kA1zAlKQEIjzxnJM7KXFiRU+qvVkKawJx/f3kTBIVyqLf StYweWCin/xRHi2AYCUibMPEHVRS9rOC1fA6hmNxXaKfRnXMfVynvlab36zpvLdSGD1O3k0LD r08n8iUNIpAL9t2luK6nLIIOKtgxnGR3LGfb58j5FwWCZqMqzfba2rYQtuYZ1cMHEBjvpGrGQ vmo27TIYQBArENnvCoxZCmoIsLmog3hpPHDcHX8r7JN60f9xn04IF2kjbJEkhvdPBGDTdXq1I HHD0lqWeJFav1HvfnTBb35Ht1v+SP3yvNi+h5dXjcfdKlWC89P91I/sO/uSiYKCSJv3tzzR8W bWBnxIn4573s2ZJT7sQqYagRRKLg4fIF/OEV7OnUJWCnYtfF3FuqkGT9EsM7x11UbryR7bP4Y BtNDhmmieJVt44JnxUGzwJAZZpbhRu/ul73jC0RGqYQZN43LRZ1SRfyvkpd5AFzTmaY4vrZfY VQzZK71PKzSa3VhAtyrgpMaHkhjdiAnzfMI3rPIhCtsRc5u4m2KXIZnWxsvIwEU9P6ZUcaKUA 4Zp7PRPC7mQYR7TM1tsZ3axjAg2wz7aRUX1sKAM6QkOFYWWRzDZRVOJV/0vnQTFAiujl6fUpr 2OSvFpoBGSWBwmk0N0O2ZlStD5iFVBXsufwoTKJyXodZTMQT3e1lAXAy3FU+mfyAm3DU= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@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 | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c index d726c6aa96a8..1bf5d2347928 100644 --- a/drivers/rtc/rtc-generic.c +++ b/drivers/rtc/rtc-generic.c @@ -9,44 +9,10 @@ #include #include -#if defined(CONFIG_M68K) || defined(CONFIG_PARISC) || \ - defined(CONFIG_PPC) || defined(CONFIG_SUPERH32) -#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);