diff options
author | Hans-Christian Egtvedt <hcegtvedt@atmel.com> | 2007-07-17 07:05:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:09 -0400 |
commit | ac495bf8971f2dc9d401d892849977e86633ced6 (patch) | |
tree | e9ff9866c01cba3d52a33fe3705167eda6c84a2d | |
parent | 7a39a49c746adc08488b1403b5aeca1dbd4ce0e2 (diff) |
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>
-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, | |||
341 | case RTC_IRQP_READ: | 341 | case RTC_IRQP_READ: |
342 | if (ops->irq_set_freq) | 342 | if (ops->irq_set_freq) |
343 | err = put_user(rtc->irq_freq, (unsigned long __user *)uarg); | 343 | err = put_user(rtc->irq_freq, (unsigned long __user *)uarg); |
344 | else | ||
345 | err = -ENOTTY; | ||
344 | break; | 346 | break; |
345 | 347 | ||
346 | case RTC_IRQP_SET: | 348 | case RTC_IRQP_SET: |