summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/dev.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-23compat_ioctl: move rtc handling into drivers/rtc/dev.cArnd Bergmann1-1/+32
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-04-04rtc: core: correct trivial checkpatch warningsAlexandre Belloni1-5/+8
Correct trivial checkpatch warnings, mostly whitespace issues and unbalanced braces. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-03-18rtc: convert core to SPDX identifierAlexandre Belloni1-5/+2
Use SPDX-License-Identifier instead of a verbose license text. Also fix the block comment alignment. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-02-25rtc: remove rtc_class_ops.read_callbackAlexandre Belloni1-5/+0
Since commit 416f0e8056f7 ("RTC: sa1100: Update the sa1100 RTC driver."), the last user of .read_callback is gone. It has been 8 years and now new user appeared. Simply remove it. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-12-31rtc: rename core filesAlexandre Belloni1-0/+483
Rename core files so there is a clearer separation between the RTC core and the RTC drivers. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>