From patchwork Tue Mar 1 17:00:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8467491 Return-Path: X-Original-To: patchwork-linux-parisc@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 4C23BC0553 for ; Tue, 1 Mar 2016 17:04:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C946720265 for ; Tue, 1 Mar 2016 17:04:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E90C120125 for ; Tue, 1 Mar 2016 17:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752321AbcCARDb (ORCPT ); Tue, 1 Mar 2016 12:03:31 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:65078 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751805AbcCARDI (ORCPT ); Tue, 1 Mar 2016 12:03:08 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LmcE7-1a1jmh2tmN-00aB6I; Tue, 01 Mar 2016 18:02:12 +0100 From: Arnd Bergmann To: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org, Kyle McMartin , rtc-linux@googlegroups.com, Alessandro Zummo , linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-parisc@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Date: Tue, 1 Mar 2016 18:00:02 +0100 Message-Id: <1456851608-3374907-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456851608-3374907-1-git-send-email-arnd@arndb.de> References: <1456851608-3374907-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:M0HuYRnTCbrvYLti1pa0k8aFFtSiplAm/YV3vqyUeCG0tmXFiqe 9mvFywh5ahvQH+wTqCyZ+v1QWnP4p7Fk/F940WUZUTM4CppBmnDZkPzAHzbughbWNvhvsQ5 RKjNvcj5MCMEaKZ7xVM1JwmoX6ZEU7yEI8ylGpAs9N9avhDeiOFMHtNR+ueOyl08E5rwtpK gzH3031x/Dd1AuhVJSSdQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:NFJfdB1/Brs=:i+AKZ8vwz95evOZyp4GwhC zbVhpPLydja3eNY9EAA5PxhQf/I1BUW81XyEr+kdFoAc4O+syKAz1Q9rrmEyqcp3Yr3kj2GE7 XEZd29W7/OKktY/VxGIEGYB4LBA0mO1qUW/6I+qYW78ys6blAamhYfAfVbrjQotQfMCqRAHWF 8X1XeJt8XZwYMIFkfQvblTFipSxJrVE9xQxahlzV2BT8s8sIXlV4nOH6DFr0dot5zociHyBZp s352y0gS057YP6OPf3rha3JZdwaqICLGEoDNvhH9N1dlMdIZG9QEr1fPAmBJmFQmQjjCjdu9d D0FEsHZHiS6RExr34eJXv8dccrDj12K0n0p6kgCdxqrN0OaTG292Z2ovgly3GfXYsw9zOa+wZ S2XQofeDbjuJYqzHyNxY0eDe/J2h8iQ92Tf1Glg89NWTE+bMTeqMuKod5ovGDW+Dxexev2rg3 sHuZsJ+sS5pnPHEcBxo4mZn7Dvcziw76mj/NjQqlo4OXiE4hOiV93vreAutso6I2mWG+i49Ok RKFccSSDmEiamC2vxEIqKdk6sQQiKA6i1DQyhG9wzny6K07F1FKPTkF7cvbqY2d4y2wL+uSk+ M9rggmZsB2uk0QDrAWTnvr01Dx2TyKP4hZFG4TLwo5BPhsBBxZPJHEX8hmRVBB3bwF86QCtoY qBGOkqYwRaPBCphb5riyLWZoOC9m//F1fM+ZRiD5vuX9xx9si2gwO8Jbne9t9UpMPV4c= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.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);