aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-cmos.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-05-08 03:33:30 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:18 -0400
commitab6a2d70d18edc7a716ef3127b9e13382faec98c (patch)
tree6de624dfcbd0181e54e21f1730d2a52ae9822c47 /drivers/rtc/rtc-cmos.c
parent5726fb2012f0d96153113ddb7f988a0daea587ce (diff)
rtc: rtc interfaces don't use class_device
This patch removes class_device from the programming interface that the RTC framework exposes to the rest of the kernel. Now an rtc_device is passed, which is more type-safe and streamlines all the relevant code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-By: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r--drivers/rtc/rtc-cmos.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 7c0d60910077..4b586ebb5814 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -203,7 +203,7 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
203 rtc_intr = CMOS_READ(RTC_INTR_FLAGS); 203 rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
204 rtc_intr &= (rtc_control & RTC_IRQMASK) | RTC_IRQF; 204 rtc_intr &= (rtc_control & RTC_IRQMASK) | RTC_IRQF;
205 if (is_intr(rtc_intr)) 205 if (is_intr(rtc_intr))
206 rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr); 206 rtc_update_irq(cmos->rtc, 1, rtc_intr);
207 207
208 /* update alarm */ 208 /* update alarm */
209 CMOS_WRITE(hrs, RTC_HOURS_ALARM); 209 CMOS_WRITE(hrs, RTC_HOURS_ALARM);
@@ -223,7 +223,7 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
223 rtc_intr = CMOS_READ(RTC_INTR_FLAGS); 223 rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
224 rtc_intr &= (rtc_control & RTC_IRQMASK) | RTC_IRQF; 224 rtc_intr &= (rtc_control & RTC_IRQMASK) | RTC_IRQF;
225 if (is_intr(rtc_intr)) 225 if (is_intr(rtc_intr))
226 rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr); 226 rtc_update_irq(cmos->rtc, 1, rtc_intr);
227 } 227 }
228 228
229 spin_unlock_irq(&rtc_lock); 229 spin_unlock_irq(&rtc_lock);
@@ -304,7 +304,7 @@ cmos_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
304 rtc_intr = CMOS_READ(RTC_INTR_FLAGS); 304 rtc_intr = CMOS_READ(RTC_INTR_FLAGS);
305 rtc_intr &= (rtc_control & RTC_IRQMASK) | RTC_IRQF; 305 rtc_intr &= (rtc_control & RTC_IRQMASK) | RTC_IRQF;
306 if (is_intr(rtc_intr)) 306 if (is_intr(rtc_intr))
307 rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr); 307 rtc_update_irq(cmos->rtc, 1, rtc_intr);
308 spin_unlock_irqrestore(&rtc_lock, flags); 308 spin_unlock_irqrestore(&rtc_lock, flags);
309 return 0; 309 return 0;
310} 310}
@@ -471,7 +471,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
471 if (is_valid_irq(rtc_irq)) 471 if (is_valid_irq(rtc_irq))
472 retval = request_irq(rtc_irq, cmos_interrupt, IRQF_DISABLED, 472 retval = request_irq(rtc_irq, cmos_interrupt, IRQF_DISABLED,
473 cmos_rtc.rtc->class_dev.class_id, 473 cmos_rtc.rtc->class_dev.class_id,
474 &cmos_rtc.rtc->class_dev); 474 cmos_rtc.rtc);
475 if (retval < 0) { 475 if (retval < 0) {
476 dev_dbg(dev, "IRQ %d is already in use\n", rtc_irq); 476 dev_dbg(dev, "IRQ %d is already in use\n", rtc_irq);
477 goto cleanup1; 477 goto cleanup1;
@@ -555,7 +555,7 @@ static int cmos_suspend(struct device *dev, pm_message_t mesg)
555 irqstat = CMOS_READ(RTC_INTR_FLAGS); 555 irqstat = CMOS_READ(RTC_INTR_FLAGS);
556 irqstat &= (tmp & RTC_IRQMASK) | RTC_IRQF; 556 irqstat &= (tmp & RTC_IRQMASK) | RTC_IRQF;
557 if (is_intr(irqstat)) 557 if (is_intr(irqstat))
558 rtc_update_irq(&cmos->rtc->class_dev, 1, irqstat); 558 rtc_update_irq(cmos->rtc, 1, irqstat);
559 } 559 }
560 spin_unlock_irq(&rtc_lock); 560 spin_unlock_irq(&rtc_lock);
561 561
@@ -590,7 +590,7 @@ static int cmos_resume(struct device *dev)
590 tmp = CMOS_READ(RTC_INTR_FLAGS); 590 tmp = CMOS_READ(RTC_INTR_FLAGS);
591 tmp &= (cmos->suspend_ctrl & RTC_IRQMASK) | RTC_IRQF; 591 tmp &= (cmos->suspend_ctrl & RTC_IRQMASK) | RTC_IRQF;
592 if (is_intr(tmp)) 592 if (is_intr(tmp))
593 rtc_update_irq(&cmos->rtc->class_dev, 1, tmp); 593 rtc_update_irq(cmos->rtc, 1, tmp);
594 spin_unlock_irq(&rtc_lock); 594 spin_unlock_irq(&rtc_lock);
595 } 595 }
596 596