diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-13 16:45:48 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-12-13 16:48:21 -0500 |
commit | 96c8f06a0fb359a9a89701a7afab6d837e466ab0 (patch) | |
tree | 038d92c31b95abfd5ab83428ab965de82548c4c9 /drivers/rtc | |
parent | 042620a018afcfba1d678062b62e463b9e43a68d (diff) |
rtc: Namespace fixup
rtctimer_* is already occupied by sound/core/rtctimer.c. Instead of
fiddling with that, rename the new functions to rtc_timer_* which
reads nicer anyway.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/class.c | 6 | ||||
-rw-r--r-- | drivers/rtc/interface.c | 42 |
2 files changed, 24 insertions, 24 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 95d2b82762d6..3243832a17cd 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c | |||
@@ -155,11 +155,11 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev, | |||
155 | 155 | ||
156 | /* Init timerqueue */ | 156 | /* Init timerqueue */ |
157 | timerqueue_init_head(&rtc->timerqueue); | 157 | timerqueue_init_head(&rtc->timerqueue); |
158 | INIT_WORK(&rtc->irqwork, rtctimer_do_work); | 158 | INIT_WORK(&rtc->irqwork, rtc_timer_do_work); |
159 | /* Init aie timer */ | 159 | /* Init aie timer */ |
160 | rtctimer_init(&rtc->aie_timer, rtc_aie_update_irq, (void *)rtc); | 160 | rtc_timer_init(&rtc->aie_timer, rtc_aie_update_irq, (void *)rtc); |
161 | /* Init uie timer */ | 161 | /* Init uie timer */ |
162 | rtctimer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, (void *)rtc); | 162 | rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, (void *)rtc); |
163 | /* Init pie timer */ | 163 | /* Init pie timer */ |
164 | hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 164 | hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
165 | rtc->pie_timer.function = rtc_pie_update_irq; | 165 | rtc->pie_timer.function = rtc_pie_update_irq; |
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index c81c50b497b7..90384b9f6b2c 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -174,14 +174,14 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
174 | if (err) | 174 | if (err) |
175 | return err; | 175 | return err; |
176 | if (rtc->aie_timer.enabled) { | 176 | if (rtc->aie_timer.enabled) { |
177 | rtctimer_remove(rtc, &rtc->aie_timer); | 177 | rtc_timer_remove(rtc, &rtc->aie_timer); |
178 | rtc->aie_timer.enabled = 0; | 178 | rtc->aie_timer.enabled = 0; |
179 | } | 179 | } |
180 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); | 180 | rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time); |
181 | rtc->aie_timer.period = ktime_set(0, 0); | 181 | rtc->aie_timer.period = ktime_set(0, 0); |
182 | if (alarm->enabled) { | 182 | if (alarm->enabled) { |
183 | rtc->aie_timer.enabled = 1; | 183 | rtc->aie_timer.enabled = 1; |
184 | rtctimer_enqueue(rtc, &rtc->aie_timer); | 184 | rtc_timer_enqueue(rtc, &rtc->aie_timer); |
185 | } | 185 | } |
186 | mutex_unlock(&rtc->ops_lock); | 186 | mutex_unlock(&rtc->ops_lock); |
187 | return 0; | 187 | return 0; |
@@ -197,9 +197,9 @@ int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled) | |||
197 | if (rtc->aie_timer.enabled != enabled) { | 197 | if (rtc->aie_timer.enabled != enabled) { |
198 | if (enabled) { | 198 | if (enabled) { |
199 | rtc->aie_timer.enabled = 1; | 199 | rtc->aie_timer.enabled = 1; |
200 | rtctimer_enqueue(rtc, &rtc->aie_timer); | 200 | rtc_timer_enqueue(rtc, &rtc->aie_timer); |
201 | } else { | 201 | } else { |
202 | rtctimer_remove(rtc, &rtc->aie_timer); | 202 | rtc_timer_remove(rtc, &rtc->aie_timer); |
203 | rtc->aie_timer.enabled = 0; | 203 | rtc->aie_timer.enabled = 0; |
204 | } | 204 | } |
205 | } | 205 | } |
@@ -236,9 +236,9 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled) | |||
236 | rtc->uie_rtctimer.node.expires = ktime_add(now, onesec); | 236 | rtc->uie_rtctimer.node.expires = ktime_add(now, onesec); |
237 | rtc->uie_rtctimer.period = ktime_set(1, 0); | 237 | rtc->uie_rtctimer.period = ktime_set(1, 0); |
238 | rtc->uie_rtctimer.enabled = 1; | 238 | rtc->uie_rtctimer.enabled = 1; |
239 | rtctimer_enqueue(rtc, &rtc->uie_rtctimer); | 239 | rtc_timer_enqueue(rtc, &rtc->uie_rtctimer); |
240 | } else { | 240 | } else { |
241 | rtctimer_remove(rtc, &rtc->uie_rtctimer); | 241 | rtc_timer_remove(rtc, &rtc->uie_rtctimer); |
242 | rtc->uie_rtctimer.enabled = 0; | 242 | rtc->uie_rtctimer.enabled = 0; |
243 | } | 243 | } |
244 | 244 | ||
@@ -481,7 +481,7 @@ int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq) | |||
481 | EXPORT_SYMBOL_GPL(rtc_irq_set_freq); | 481 | EXPORT_SYMBOL_GPL(rtc_irq_set_freq); |
482 | 482 | ||
483 | /** | 483 | /** |
484 | * rtctimer_enqueue - Adds a rtc_timer to the rtc_device timerqueue | 484 | * rtc_timer_enqueue - Adds a rtc_timer to the rtc_device timerqueue |
485 | * @rtc rtc device | 485 | * @rtc rtc device |
486 | * @timer timer being added. | 486 | * @timer timer being added. |
487 | * | 487 | * |
@@ -490,7 +490,7 @@ EXPORT_SYMBOL_GPL(rtc_irq_set_freq); | |||
490 | * | 490 | * |
491 | * Must hold ops_lock for proper serialization of timerqueue | 491 | * Must hold ops_lock for proper serialization of timerqueue |
492 | */ | 492 | */ |
493 | void rtctimer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer) | 493 | void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer) |
494 | { | 494 | { |
495 | timerqueue_add(&rtc->timerqueue, &timer->node); | 495 | timerqueue_add(&rtc->timerqueue, &timer->node); |
496 | if (&timer->node == timerqueue_getnext(&rtc->timerqueue)) { | 496 | if (&timer->node == timerqueue_getnext(&rtc->timerqueue)) { |
@@ -505,7 +505,7 @@ void rtctimer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer) | |||
505 | } | 505 | } |
506 | 506 | ||
507 | /** | 507 | /** |
508 | * rtctimer_remove - Removes a rtc_timer from the rtc_device timerqueue | 508 | * rtc_timer_remove - Removes a rtc_timer from the rtc_device timerqueue |
509 | * @rtc rtc device | 509 | * @rtc rtc device |
510 | * @timer timer being removed. | 510 | * @timer timer being removed. |
511 | * | 511 | * |
@@ -514,7 +514,7 @@ void rtctimer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer) | |||
514 | * | 514 | * |
515 | * Must hold ops_lock for proper serialization of timerqueue | 515 | * Must hold ops_lock for proper serialization of timerqueue |
516 | */ | 516 | */ |
517 | void rtctimer_remove(struct rtc_device *rtc, struct rtc_timer *timer) | 517 | void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer) |
518 | { | 518 | { |
519 | struct timerqueue_node *next = timerqueue_getnext(&rtc->timerqueue); | 519 | struct timerqueue_node *next = timerqueue_getnext(&rtc->timerqueue); |
520 | timerqueue_del(&rtc->timerqueue, &timer->node); | 520 | timerqueue_del(&rtc->timerqueue, &timer->node); |
@@ -534,7 +534,7 @@ void rtctimer_remove(struct rtc_device *rtc, struct rtc_timer *timer) | |||
534 | } | 534 | } |
535 | 535 | ||
536 | /** | 536 | /** |
537 | * rtctimer_do_work - Expires rtc timers | 537 | * rtc_timer_do_work - Expires rtc timers |
538 | * @rtc rtc device | 538 | * @rtc rtc device |
539 | * @timer timer being removed. | 539 | * @timer timer being removed. |
540 | * | 540 | * |
@@ -543,7 +543,7 @@ void rtctimer_remove(struct rtc_device *rtc, struct rtc_timer *timer) | |||
543 | * | 543 | * |
544 | * Serializes access to timerqueue via ops_lock mutex | 544 | * Serializes access to timerqueue via ops_lock mutex |
545 | */ | 545 | */ |
546 | void rtctimer_do_work(struct work_struct *work) | 546 | void rtc_timer_do_work(struct work_struct *work) |
547 | { | 547 | { |
548 | struct rtc_timer *timer; | 548 | struct rtc_timer *timer; |
549 | struct timerqueue_node *next; | 549 | struct timerqueue_node *next; |
@@ -592,14 +592,14 @@ again: | |||
592 | } | 592 | } |
593 | 593 | ||
594 | 594 | ||
595 | /* rtctimer_init - Initializes an rtc_timer | 595 | /* rtc_timer_init - Initializes an rtc_timer |
596 | * @timer: timer to be intiialized | 596 | * @timer: timer to be intiialized |
597 | * @f: function pointer to be called when timer fires | 597 | * @f: function pointer to be called when timer fires |
598 | * @data: private data passed to function pointer | 598 | * @data: private data passed to function pointer |
599 | * | 599 | * |
600 | * Kernel interface to initializing an rtc_timer. | 600 | * Kernel interface to initializing an rtc_timer. |
601 | */ | 601 | */ |
602 | void rtctimer_init(struct rtc_timer *timer, void (*f)(void* p), void* data) | 602 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data) |
603 | { | 603 | { |
604 | timerqueue_init(&timer->node); | 604 | timerqueue_init(&timer->node); |
605 | timer->enabled = 0; | 605 | timer->enabled = 0; |
@@ -607,7 +607,7 @@ void rtctimer_init(struct rtc_timer *timer, void (*f)(void* p), void* data) | |||
607 | timer->task.private_data = data; | 607 | timer->task.private_data = data; |
608 | } | 608 | } |
609 | 609 | ||
610 | /* rtctimer_start - Sets an rtc_timer to fire in the future | 610 | /* rtc_timer_start - Sets an rtc_timer to fire in the future |
611 | * @ rtc: rtc device to be used | 611 | * @ rtc: rtc device to be used |
612 | * @ timer: timer being set | 612 | * @ timer: timer being set |
613 | * @ expires: time at which to expire the timer | 613 | * @ expires: time at which to expire the timer |
@@ -615,36 +615,36 @@ void rtctimer_init(struct rtc_timer *timer, void (*f)(void* p), void* data) | |||
615 | * | 615 | * |
616 | * Kernel interface to set an rtc_timer | 616 | * Kernel interface to set an rtc_timer |
617 | */ | 617 | */ |
618 | int rtctimer_start(struct rtc_device *rtc, struct rtc_timer* timer, | 618 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, |
619 | ktime_t expires, ktime_t period) | 619 | ktime_t expires, ktime_t period) |
620 | { | 620 | { |
621 | int ret = 0; | 621 | int ret = 0; |
622 | mutex_lock(&rtc->ops_lock); | 622 | mutex_lock(&rtc->ops_lock); |
623 | if (timer->enabled) | 623 | if (timer->enabled) |
624 | rtctimer_remove(rtc, timer); | 624 | rtc_timer_remove(rtc, timer); |
625 | 625 | ||
626 | timer->node.expires = expires; | 626 | timer->node.expires = expires; |
627 | timer->period = period; | 627 | timer->period = period; |
628 | 628 | ||
629 | timer->enabled = 1; | 629 | timer->enabled = 1; |
630 | rtctimer_enqueue(rtc, timer); | 630 | rtc_timer_enqueue(rtc, timer); |
631 | 631 | ||
632 | mutex_unlock(&rtc->ops_lock); | 632 | mutex_unlock(&rtc->ops_lock); |
633 | return ret; | 633 | return ret; |
634 | } | 634 | } |
635 | 635 | ||
636 | /* rtctimer_cancel - Stops an rtc_timer | 636 | /* rtc_timer_cancel - Stops an rtc_timer |
637 | * @ rtc: rtc device to be used | 637 | * @ rtc: rtc device to be used |
638 | * @ timer: timer being set | 638 | * @ timer: timer being set |
639 | * | 639 | * |
640 | * Kernel interface to cancel an rtc_timer | 640 | * Kernel interface to cancel an rtc_timer |
641 | */ | 641 | */ |
642 | int rtctimer_cancel(struct rtc_device *rtc, struct rtc_timer* timer) | 642 | int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer* timer) |
643 | { | 643 | { |
644 | int ret = 0; | 644 | int ret = 0; |
645 | mutex_lock(&rtc->ops_lock); | 645 | mutex_lock(&rtc->ops_lock); |
646 | if (timer->enabled) | 646 | if (timer->enabled) |
647 | rtctimer_remove(rtc, timer); | 647 | rtc_timer_remove(rtc, timer); |
648 | timer->enabled = 0; | 648 | timer->enabled = 0; |
649 | mutex_unlock(&rtc->ops_lock); | 649 | mutex_unlock(&rtc->ops_lock); |
650 | return ret; | 650 | return ret; |