Commit adf25df1be2e3843f786a2562202c7897bbd149d
Committed by
Jaroslav Kysela
1 parent
3527a008cb
Exists in
master
and in
39 other branches
[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>
Showing 1 changed file with 1 additions and 8 deletions Side-by-side Diff
sound/core/rtctimer.c
... | ... | @@ -60,7 +60,6 @@ |
60 | 60 | |
61 | 61 | static int rtctimer_freq = RTC_FREQ; /* frequency */ |
62 | 62 | static snd_timer_t *rtctimer; |
63 | -static atomic_t rtc_inc = ATOMIC_INIT(0); | |
64 | 63 | static rtc_task_t rtc_task; |
65 | 64 | |
66 | 65 | |
... | ... | @@ -94,7 +93,6 @@ |
94 | 93 | snd_assert(rtc != NULL, return -EINVAL); |
95 | 94 | rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq); |
96 | 95 | rtc_control(rtc, RTC_PIE_ON, 0); |
97 | - atomic_set(&rtc_inc, 0); | |
98 | 96 | return 0; |
99 | 97 | } |
100 | 98 | |
... | ... | @@ -112,12 +110,7 @@ |
112 | 110 | */ |
113 | 111 | static void rtctimer_interrupt(void *private_data) |
114 | 112 | { |
115 | - int ticks; | |
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); | |
113 | + snd_timer_interrupt(private_data, 1); | |
121 | 114 | } |
122 | 115 | |
123 | 116 |