diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-18 08:23:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-18 08:23:10 -0600 |
commit | c875dcfd8a753cd131d39e1efa5f34642200e52c (patch) | |
tree | c7bc9abc91fc3aa5ad3ef5ceb01ca0510713776b /nuttx/drivers | |
parent | 1aa475c18f1aa490ed96555f848a617f80feede8 (diff) | |
download | px4-nuttx-c875dcfd8a753cd131d39e1efa5f34642200e52c.tar.gz px4-nuttx-c875dcfd8a753cd131d39e1efa5f34642200e52c.tar.bz2 px4-nuttx-c875dcfd8a753cd131d39e1efa5f34642200e52c.zip |
The RTC ioctl() method is now a configuration option
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/timers/Kconfig | 7 | ||||
-rw-r--r-- | nuttx/drivers/timers/rtc.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/nuttx/drivers/timers/Kconfig b/nuttx/drivers/timers/Kconfig index af0fb3e42..ee4698d88 100644 --- a/nuttx/drivers/timers/Kconfig +++ b/nuttx/drivers/timers/Kconfig @@ -107,6 +107,13 @@ config RTC_EPOCHYEAR With some RTCs, these operations can be used to read or to set the RTC's Epoch, respectively. +config RTC_IOCTL + bool "RTC IOCTLs" + default n + ---help--- + Support the RTC interface ioctl() method. This allows you to add + architecture-specific RTC operations to the RTC interface + endif # RTC_DRIVER endif # RTC diff --git a/nuttx/drivers/timers/rtc.c b/nuttx/drivers/timers/rtc.c index f3231ded1..6550131e4 100644 --- a/nuttx/drivers/timers/rtc.c +++ b/nuttx/drivers/timers/rtc.c @@ -509,10 +509,12 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { ret = -ENOTTY; +#ifdef CONFIG_RTC_IOCTL if (ops->ioctl) { ret = ops->ioctl(upper->lower, cmd, arg); } +#endif } break; } |