diff options
author | Hans-Christian Egtvedt <hcegtvedt@atmel.com> | 2007-07-17 04:05:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 10:23:09 -0700 |
commit | ac495bf8971f2dc9d401d892849977e86633ced6 (patch) | |
tree | e9ff9866c01cba3d52a33fe3705167eda6c84a2d /drivers/rtc | |
parent | 7a39a49c746adc08488b1403b5aeca1dbd4ce0e2 (diff) | |
download | blackbird-op-linux-ac495bf8971f2dc9d401d892849977e86633ced6.tar.gz blackbird-op-linux-ac495bf8971f2dc9d401d892849977e86633ced6.zip |
rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index f4e5f0040ff7..304535942de2 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -341,6 +341,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, case RTC_IRQP_READ: if (ops->irq_set_freq) err = put_user(rtc->irq_freq, (unsigned long __user *)uarg); + else + err = -ENOTTY; break; case RTC_IRQP_SET: |