From: Arnd Bergmann <arnd@arndb.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
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 [thread overview]
Message-ID: <1461796470-1291527-15-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de>
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 <arnd@arndb.de>
---
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 <linux/platform_device.h>
#include <linux/rtc.h>
-#if 0
-#include <asm/rtc.h>
-
-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);
--
2.7.0
next prev parent reply other threads:[~2016-04-27 22:34 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 22:34 [PATCH v3 00/16] genrtc removal Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 01/16] rtc: cmos: remove empty asm/mc146818rtc.h files Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 02/16] rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 03/16] char/genrtc: x86: remove remnants of asm/rtc.h Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 04/16] rtc: sh: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 23:21 ` Rich Felker
2016-04-27 23:21 ` Rich Felker
2016-04-28 7:21 ` Geert Uytterhoeven
2016-04-28 7:21 ` Geert Uytterhoeven
2016-04-28 9:08 ` Arnd Bergmann
2016-04-28 9:08 ` Arnd Bergmann
2016-04-28 9:38 ` Arnd Bergmann
2016-04-28 9:38 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 05/16] char/genrtc: remove alpha support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 06/16] char/genrtc: remove mn10300 support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 07/16] rtc: parisc: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 08/16] char/genrtc: remove parisc support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 09/16] rtc: m68k: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 23:04 ` Arnd Bergmann
2016-04-27 23:04 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 10/16] rtc: m68k: provide ioctl for q40 Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 11/16] char/genrtc: remove m68k support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 12/16] rtc: powerpc: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-05-03 4:05 ` Michael Ellerman
2016-05-03 4:05 ` Michael Ellerman
2016-05-03 10:29 ` Arnd Bergmann
2016-05-03 10:29 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 13/16] char/genrtc: remove powerpc support Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-28 7:25 ` Geert Uytterhoeven
2016-04-28 7:25 ` Geert Uytterhoeven
2016-04-28 9:39 ` Arnd Bergmann
2016-04-28 9:39 ` Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann [this message]
2016-04-27 22:34 ` [PATCH v3 14/16] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 15/16] char/genrtc: remove asm-generic/rtc.h from mips Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-27 22:34 ` [PATCH v3 16/16] char/genrtc: remove the rest of the driver Arnd Bergmann
2016-04-27 22:34 ` Arnd Bergmann
2016-04-28 7:48 ` [PATCH v3 00/16] genrtc removal Geert Uytterhoeven
2016-04-28 7:48 ` Geert Uytterhoeven
2016-05-02 8:45 ` Geert Uytterhoeven
2016-05-02 8:45 ` Geert Uytterhoeven
2016-05-03 7:24 ` Alexandre Belloni
2016-05-03 7:24 ` Alexandre Belloni
2016-05-03 10:05 ` Arnd Bergmann
2016-05-03 10:05 ` Arnd Bergmann
2016-05-29 23:37 ` Alexandre Belloni
2016-05-29 23:37 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461796470-1291527-15-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=benh@kernel.crashing.org \
--cc=dalias@libc.org \
--cc=deller@gmx.de \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).