diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:40 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:55 -0500 |
| commit | 66b0835e2bb3d345f060a47bb8c8f883bd25ec2b (patch) | |
| tree | d1fc390dfa58f131df908267d87ef99d4522a596 /drivers/rtc/rtc-dev.c | |
| parent | 479b46b5599b1e610630d7332e168c1f9c4ee0b4 (diff) | |
| parent | 85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff) | |
Merge 2.6.38-rc5 into usb-next
This is needed to resolve some merge conflicts that were found
in the USB host controller patches, and reported by Stephen Rothwell.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
| -rw-r--r-- | drivers/rtc/rtc-dev.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 212b16edafc0..37c3cc1b3dd5 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, | |||
| 154 | if (err) | 154 | if (err) |
| 155 | goto done; | 155 | goto done; |
| 156 | 156 | ||
| 157 | /* try the driver's ioctl interface */ | 157 | /* |
| 158 | if (ops->ioctl) { | ||
| 159 | err = ops->ioctl(rtc->dev.parent, cmd, arg); | ||
| 160 | if (err != -ENOIOCTLCMD) { | ||
| 161 | mutex_unlock(&rtc->ops_lock); | ||
| 162 | return err; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 166 | /* if the driver does not provide the ioctl interface | ||
| 167 | * or if that particular ioctl was not implemented | ||
| 168 | * (-ENOIOCTLCMD), we will try to emulate here. | ||
| 169 | * | ||
| 170 | * Drivers *SHOULD NOT* provide ioctl implementations | 158 | * Drivers *SHOULD NOT* provide ioctl implementations |
| 171 | * for these requests. Instead, provide methods to | 159 | * for these requests. Instead, provide methods to |
| 172 | * support the following code, so that the RTC's main | 160 | * support the following code, so that the RTC's main |
| @@ -329,7 +317,12 @@ static long rtc_dev_ioctl(struct file *file, | |||
| 329 | return err; | 317 | return err; |
| 330 | 318 | ||
| 331 | default: | 319 | default: |
| 332 | err = -ENOTTY; | 320 | /* Finally try the driver's ioctl interface */ |
| 321 | if (ops->ioctl) { | ||
| 322 | err = ops->ioctl(rtc->dev.parent, cmd, arg); | ||
| 323 | if (err == -ENOIOCTLCMD) | ||
| 324 | err = -ENOTTY; | ||
| 325 | } | ||
| 333 | break; | 326 | break; |
| 334 | } | 327 | } |
| 335 | 328 | ||
