summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-dev.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-14 08:00:30 (GMT)
committerThomas Gleixner <tglx@linutronix.de>2011-02-14 08:00:30 (GMT)
commit6ee5859df5baabb82014573d126b9fd790c3a9d8 (patch)
treec0709418742dee58c8b2e0ba2619a3149d4a685d /drivers/rtc/rtc-dev.c
parent55835eb62fad1253c9e657a667549945e4be9759 (diff)
parentd8ce1481ee8770ef2314eb7984a2228dbf64ad06 (diff)
downloadlinux-fsl-qoriq-6ee5859df5baabb82014573d126b9fd790c3a9d8.tar.xz
Merge branch 'fortglx/2.6.38/tip/timers/rtc' of git://git.linaro.org/people/jstultz/linux into timers/urgent
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r--drivers/rtc/rtc-dev.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 212b16e..37c3cc1 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -154,19 +154,7 @@ static long rtc_dev_ioctl(struct file *file,
if (err)
goto done;
- /* try the driver's ioctl interface */
- if (ops->ioctl) {
- err = ops->ioctl(rtc->dev.parent, cmd, arg);
- if (err != -ENOIOCTLCMD) {
- mutex_unlock(&rtc->ops_lock);
- return err;
- }
- }
-
- /* if the driver does not provide the ioctl interface
- * or if that particular ioctl was not implemented
- * (-ENOIOCTLCMD), we will try to emulate here.
- *
+ /*
* Drivers *SHOULD NOT* provide ioctl implementations
* for these requests. Instead, provide methods to
* support the following code, so that the RTC's main
@@ -329,7 +317,12 @@ static long rtc_dev_ioctl(struct file *file,
return err;
default:
- err = -ENOTTY;
+ /* Finally try the driver's ioctl interface */
+ if (ops->ioctl) {
+ err = ops->ioctl(rtc->dev.parent, cmd, arg);
+ if (err == -ENOIOCTLCMD)
+ err = -ENOTTY;
+ }
break;
}