diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-23 03:21:41 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-23 03:21:41 -0500 |
commit | 7acdbb3f35f4d08c0c4f7cfa306bc7006b6ba902 (patch) | |
tree | c76aeb5996fa8f39b838e9cc41f40f854db01912 /drivers/rtc/rtc-mrst.c | |
parent | 695884fb8acd9857e0e7120ccb2150e30f4b8fef (diff) | |
parent | f5412be599602124d2bdd49947b231dd77c0bf99 (diff) |
Merge branch 'linus' into x86/platform
Reason: Import mainline device tree changes on which further patches
depend on or conflict.
Trivial conflict in: drivers/spi/pxa2xx_spi_pci.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/rtc/rtc-mrst.c')
-rw-r--r-- | drivers/rtc/rtc-mrst.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c index 28e02e7580f4..8d2cf6027120 100644 --- a/drivers/rtc/rtc-mrst.c +++ b/drivers/rtc/rtc-mrst.c | |||
@@ -266,42 +266,21 @@ static int mrst_irq_set_state(struct device *dev, int enabled) | |||
266 | return 0; | 266 | return 0; |
267 | } | 267 | } |
268 | 268 | ||
269 | #if defined(CONFIG_RTC_INTF_DEV) || defined(CONFIG_RTC_INTF_DEV_MODULE) | ||
270 | |||
271 | /* Currently, the vRTC doesn't support UIE ON/OFF */ | 269 | /* Currently, the vRTC doesn't support UIE ON/OFF */ |
272 | static int | 270 | static int mrst_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) |
273 | mrst_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) | ||
274 | { | 271 | { |
275 | struct mrst_rtc *mrst = dev_get_drvdata(dev); | 272 | struct mrst_rtc *mrst = dev_get_drvdata(dev); |
276 | unsigned long flags; | 273 | unsigned long flags; |
277 | 274 | ||
278 | switch (cmd) { | ||
279 | case RTC_AIE_OFF: | ||
280 | case RTC_AIE_ON: | ||
281 | if (!mrst->irq) | ||
282 | return -EINVAL; | ||
283 | break; | ||
284 | default: | ||
285 | /* PIE ON/OFF is handled by mrst_irq_set_state() */ | ||
286 | return -ENOIOCTLCMD; | ||
287 | } | ||
288 | |||
289 | spin_lock_irqsave(&rtc_lock, flags); | 275 | spin_lock_irqsave(&rtc_lock, flags); |
290 | switch (cmd) { | 276 | if (enabled) |
291 | case RTC_AIE_OFF: /* alarm off */ | ||
292 | mrst_irq_disable(mrst, RTC_AIE); | ||
293 | break; | ||
294 | case RTC_AIE_ON: /* alarm on */ | ||
295 | mrst_irq_enable(mrst, RTC_AIE); | 277 | mrst_irq_enable(mrst, RTC_AIE); |
296 | break; | 278 | else |
297 | } | 279 | mrst_irq_disable(mrst, RTC_AIE); |
298 | spin_unlock_irqrestore(&rtc_lock, flags); | 280 | spin_unlock_irqrestore(&rtc_lock, flags); |
299 | return 0; | 281 | return 0; |
300 | } | 282 | } |
301 | 283 | ||
302 | #else | ||
303 | #define mrst_rtc_ioctl NULL | ||
304 | #endif | ||
305 | 284 | ||
306 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | 285 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) |
307 | 286 | ||
@@ -328,13 +307,13 @@ static int mrst_procfs(struct device *dev, struct seq_file *seq) | |||
328 | #endif | 307 | #endif |
329 | 308 | ||
330 | static const struct rtc_class_ops mrst_rtc_ops = { | 309 | static const struct rtc_class_ops mrst_rtc_ops = { |
331 | .ioctl = mrst_rtc_ioctl, | ||
332 | .read_time = mrst_read_time, | 310 | .read_time = mrst_read_time, |
333 | .set_time = mrst_set_time, | 311 | .set_time = mrst_set_time, |
334 | .read_alarm = mrst_read_alarm, | 312 | .read_alarm = mrst_read_alarm, |
335 | .set_alarm = mrst_set_alarm, | 313 | .set_alarm = mrst_set_alarm, |
336 | .proc = mrst_procfs, | 314 | .proc = mrst_procfs, |
337 | .irq_set_state = mrst_irq_set_state, | 315 | .irq_set_state = mrst_irq_set_state, |
316 | .alarm_irq_enable = mrst_rtc_alarm_irq_enable, | ||
338 | }; | 317 | }; |
339 | 318 | ||
340 | static struct mrst_rtc mrst_rtc; | 319 | static struct mrst_rtc mrst_rtc; |