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: 102439 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1851171qge; Tue, 26 Apr 2016 14:53:55 -0700 (PDT) X-Received: by 10.98.13.77 with SMTP id v74mr6960183pfi.162.1461707635478; Tue, 26 Apr 2016 14:53:55 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u62si5629509pfi.150.2016.04.26.14.53.55; Tue, 26 Apr 2016 14:53:55 -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 S1753463AbcDZVxi (ORCPT + 29 others); Tue, 26 Apr 2016 17:53:38 -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-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 | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) -- 2.7.0 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);