Arnd Bergmann
076ff65862
compat_ioctl: move rtc handling into drivers/rtc/dev.c
...
We no longer need the rtc compat handling to be in common code, now that
all drivers are either moved to the rtc-class framework, or (rarely)
exist in drivers/char for architectures without compat mode (m68k,
alpha and ia64, respectively).
I checked the list of ioctl commands in drivers, and the ones that are
not already handled are all compatible, again with the one exception of
m68k driver, which implements RTC_PLL_GET and RTC_PLL_SET, but has no
compat mode.
Unlike earlier versions of this patch, I'm now adding a separate
compat_ioctl handler that takes care of RTC_IRQP_READ32/RTC_IRQP_SET32
and treats all other commands as compatible, leaving the native
behavior unchanged.
The old conversion handler also deals with RTC_EPOCH_READ and
RTC_EPOCH_SET, which are not handled in rtc-dev.c but only in a single
device driver (rtc-vr41xx), so I'm adding the compat version in the same
place. I don't expect other drivers to need those commands in the future.
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v4: handle RTC_EPOCH_SET32 in rtc_dev_compat_ioctl
v3: handle RTC_IRQP_READ32/RTC_IRQP_SET32 in rtc_dev_compat_ioctl
v2: merge compat handler into ioctl function to avoid the
compat_alloc_user_space() roundtrip, based on feedback
from Al Viro.
2019-10-23 17:23:43 +02:00
..
2019-08-20 21:44:45 +02:00
2019-10-23 17:23:43 +02:00
2019-04-04 10:07:08 +02:00
2019-07-30 13:07:41 +02:00
2019-09-22 11:05:43 -07:00
2019-04-06 15:05:31 +02:00
2019-08-23 16:20:50 +02:00
2019-04-04 10:07:08 +02:00
2019-04-04 10:07:08 +02:00
2019-08-21 09:57:23 +02:00
2019-08-13 10:53:10 +02:00
2019-04-11 16:42:55 +02:00
2019-05-30 11:29:22 -07:00
2019-04-04 10:07:08 +02:00
2019-08-21 09:57:23 +02:00
2019-03-18 03:36:01 +01:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-05-30 11:26:37 -07:00
2019-08-13 10:53:10 +02:00
2019-08-21 09:57:23 +02:00
2019-08-13 10:53:10 +02:00
2019-05-30 11:26:32 -07:00
2019-08-13 10:53:10 +02:00
2018-03-02 10:09:58 +01:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-05-30 11:26:32 -07:00
2019-04-08 14:40:12 +02:00
2018-09-28 14:20:59 +02:00
2019-05-30 11:26:41 -07:00
2019-09-02 11:33:42 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-09 14:46:33 -07:00
2019-08-13 10:53:10 +02:00
2019-05-08 22:14:31 +02:00
2019-04-04 10:07:09 +02:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:10 +02:00
2019-08-21 09:57:23 +02:00
2019-07-17 10:03:50 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-07-31 13:25:27 -06:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-23 17:42:25 +02:00
2019-05-30 11:26:32 -07:00
2017-11-02 11:10:55 +01:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-04-19 22:37:16 +02:00
2019-07-17 10:03:50 -07:00
2019-08-23 16:20:50 +02:00
2019-05-30 11:26:37 -07:00
2019-05-21 10:50:45 +02:00
2019-04-04 10:07:09 +02:00
2019-06-05 17:37:06 +02:00
2019-06-05 17:36:37 +02:00
2019-08-21 09:57:23 +02:00
2019-07-22 22:16:14 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-07-22 22:30:19 +02:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-04-12 12:23:20 +02:00
2019-05-30 11:26:32 -07:00
2019-07-17 10:03:50 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2018-03-17 14:20:46 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2018-11-22 18:11:35 +01:00
2018-08-14 23:38:45 +02:00
2019-09-01 09:18:35 +02:00
2019-04-16 18:06:54 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-09-10 16:14:15 +02:00
2019-02-17 21:28:39 +01:00
2015-09-05 19:37:22 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-05-21 10:50:45 +02:00
2019-08-21 09:57:23 +02:00
2019-08-13 10:53:10 +02:00
2019-04-04 10:06:54 +02:00
2019-07-22 22:16:12 +02:00
2019-08-12 23:04:25 +02:00
2019-05-16 09:19:14 -07:00
2019-05-24 17:39:01 +02:00
2016-09-02 01:24:06 +02:00
2019-05-08 22:14:36 +02:00
2019-08-20 21:42:19 +02:00
2019-08-27 18:24:15 +02:00
2019-06-19 17:09:55 +02:00
2019-09-01 10:57:47 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-04-04 10:07:11 +02:00
2019-09-01 08:48:28 +02:00
2019-08-13 10:53:10 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-08-13 10:53:10 +02:00
2019-04-04 10:07:10 +02:00
2019-08-21 09:57:23 +02:00
2019-08-13 10:53:10 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:52 -07:00
2019-08-13 10:53:10 +02:00
2019-05-21 10:50:45 +02:00
2016-05-20 12:33:51 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2017-09-05 09:55:02 +02:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-04-29 15:53:42 +02:00
2019-07-17 10:03:50 -07:00
2019-07-17 10:03:50 -07:00
2019-06-19 17:09:55 +02:00
2019-08-13 10:53:10 +02:00
2019-06-19 17:09:55 +02:00
2019-07-23 20:34:31 +02:00
2019-09-01 09:18:35 +02:00
2019-05-30 11:26:32 -07:00
2017-11-02 11:10:55 +01:00
2019-09-10 16:14:13 +02:00
2019-08-21 09:57:23 +02:00
2019-05-09 14:46:33 -07:00
2019-05-21 11:28:40 +02:00
2019-09-01 08:48:23 +02:00
2019-08-13 10:53:10 +02:00
2019-07-17 10:03:50 -07:00
2018-03-01 10:49:41 +01:00
2019-06-19 17:09:55 +02:00
2019-08-13 10:53:10 +02:00
2019-04-11 16:42:55 +02:00
2019-04-04 10:07:10 +02:00
2019-09-22 11:05:43 -07:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-05-23 17:44:52 +02:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2016-03-14 17:08:24 +01:00
2019-05-30 11:26:32 -07:00
2019-04-29 15:53:43 +02:00
2019-06-19 17:09:55 +02:00
2019-10-23 17:23:43 +02:00
2019-08-13 10:53:10 +02:00
2019-04-15 16:07:42 +02:00
2019-07-13 21:39:51 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-08-13 10:53:10 +02:00
2019-08-13 10:53:10 +02:00
2019-04-04 10:07:08 +02:00
2019-05-08 22:14:36 +02:00