diff options
author | Hans-Christian Egtvedt <hcegtvedt@atmel.com> | 2007-07-17 13:05:00 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 19:23:09 +0200 |
commit | ac495bf8971f2dc9d401d892849977e86633ced6 (patch) | |
tree | e9ff9866c01cba3d52a33fe3705167eda6c84a2d /drivers/rtc/rtc-dev.c | |
parent | rtc: make example code jump to done instead of return when ioctl not supported (diff) | |
download | linux-ac495bf8971f2dc9d401d892849977e86633ced6.tar.xz 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/rtc-dev.c')
-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: |