提交 ac495bf8 编写于 作者: H Hans-Christian Egtvedt 提交者: Linus Torvalds

rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver

Signed-off-by: NHans-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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7a39a49c
...@@ -341,6 +341,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, ...@@ -341,6 +341,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
case RTC_IRQP_READ: case RTC_IRQP_READ:
if (ops->irq_set_freq) if (ops->irq_set_freq)
err = put_user(rtc->irq_freq, (unsigned long __user *)uarg); err = put_user(rtc->irq_freq, (unsigned long __user *)uarg);
else
err = -ENOTTY;
break; break;
case RTC_IRQP_SET: case RTC_IRQP_SET:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册