Skip to content

Commit

Permalink
rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented b…
Browse files Browse the repository at this point in the history
…y 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>
  • Loading branch information
Hans-Christian Egtvedt authored and Linus Torvalds committed Jul 17, 2007
1 parent 7a39a49 commit ac495bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/rtc/rtc-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ac495bf

Please sign in to comment.