aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-09-27 09:56:28 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:16:44 -0500
commitadf25df1be2e3843f786a2562202c7897bbd149d (patch)
treeb4347b3faa49634f04242d3639ca025b47cccd85
parent3527a008cbc51dd23a8bf4927e3ab29423b0d05b (diff)
[ALSA] rtctimer: remove superfluous rtc_inc variable
Modules: RTC timer driver The rtc_inc variable is never used outside the interrupt handler, and is always one where it matters, so we can just remove it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
-rw-r--r--sound/core/rtctimer.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c
index bd5d584d284d..85627dbe6a57 100644
--- a/sound/core/rtctimer.c
+++ b/sound/core/rtctimer.c
@@ -60,7 +60,6 @@ static struct _snd_timer_hardware rtc_hw = {
60 60
61static int rtctimer_freq = RTC_FREQ; /* frequency */ 61static int rtctimer_freq = RTC_FREQ; /* frequency */
62static snd_timer_t *rtctimer; 62static snd_timer_t *rtctimer;
63static atomic_t rtc_inc = ATOMIC_INIT(0);
64static rtc_task_t rtc_task; 63static rtc_task_t rtc_task;
65 64
66 65
@@ -94,7 +93,6 @@ rtctimer_start(snd_timer_t *timer)
94 snd_assert(rtc != NULL, return -EINVAL); 93 snd_assert(rtc != NULL, return -EINVAL);
95 rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq); 94 rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq);
96 rtc_control(rtc, RTC_PIE_ON, 0); 95 rtc_control(rtc, RTC_PIE_ON, 0);
97 atomic_set(&rtc_inc, 0);
98 return 0; 96 return 0;
99} 97}
100 98
@@ -112,12 +110,7 @@ rtctimer_stop(snd_timer_t *timer)
112 */ 110 */
113static void rtctimer_interrupt(void *private_data) 111static void rtctimer_interrupt(void *private_data)
114{ 112{
115 int ticks; 113 snd_timer_interrupt(private_data, 1);
116
117 atomic_inc(&rtc_inc);
118 ticks = atomic_read(&rtc_inc);
119 snd_timer_interrupt((snd_timer_t*)private_data, ticks);
120 atomic_sub(ticks, &rtc_inc);
121} 114}
122 115
123 116