rtc-dev: Make RTC driver return ENOTTY instead of ENOIOCTLCMD
authorThomas Hommel <thomas.hommel@gefanuc.com>
Tue, 31 Jul 2007 07:37:31 +0000 (00:37 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:36 +0000 (15:39 -0700)
Prevent the RTC driver from returning ENOIOCTLCMD to userspace.

Signed-off-by: Thomas Hommel <thomas.hommel@gefanuc.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-dev.c

index 304535942de2568e120d26df0db9fe7c77289d5c..005fff3a3508dfe4c4d010648986acb8304e0be8 100644 (file)
@@ -348,6 +348,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
        case RTC_IRQP_SET:
                if (ops->irq_set_freq)
                        err = rtc_irq_set_freq(rtc, rtc->irq_task, arg);
+               else
+                       err = -ENOTTY;
                break;
 
 #if 0