Skip to content

Commit adf25df

Browse files
cladischJaroslav Kysela
authored andcommitted
[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>
1 parent 3527a00 commit adf25df

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎sound/core/rtctimer.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ static struct _snd_timer_hardware rtc_hw = {
6060

6161
static int rtctimer_freq = RTC_FREQ; /* frequency */
6262
static snd_timer_t *rtctimer;
63-
static atomic_t rtc_inc = ATOMIC_INIT(0);
6463
static rtc_task_t rtc_task;
6564

6665

@@ -94,7 +93,6 @@ rtctimer_start(snd_timer_t *timer)
9493
snd_assert(rtc != NULL, return -EINVAL);
9594
rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq);
9695
rtc_control(rtc, RTC_PIE_ON, 0);
97-
atomic_set(&rtc_inc, 0);
9896
return 0;
9997
}
10098

@@ -112,12 +110,7 @@ rtctimer_stop(snd_timer_t *timer)
112110
*/
113111
static void rtctimer_interrupt(void *private_data)
114112
{
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);
121114
}
122115

123116

0 commit comments

Comments
 (0)