[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>
This commit is contained in:
		
					parent
					
						
							
								3527a008cb
							
						
					
				
			
			
				commit
				
					
						adf25df1be
					
				
			
		
					 1 changed files with 1 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -60,7 +60,6 @@ static struct _snd_timer_hardware rtc_hw = {
 | 
			
		|||
 | 
			
		||||
static int rtctimer_freq = RTC_FREQ;		/* frequency */
 | 
			
		||||
static snd_timer_t *rtctimer;
 | 
			
		||||
static atomic_t rtc_inc = ATOMIC_INIT(0);
 | 
			
		||||
static rtc_task_t rtc_task;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -94,7 +93,6 @@ rtctimer_start(snd_timer_t *timer)
 | 
			
		|||
	snd_assert(rtc != NULL, return -EINVAL);
 | 
			
		||||
	rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq);
 | 
			
		||||
	rtc_control(rtc, RTC_PIE_ON, 0);
 | 
			
		||||
	atomic_set(&rtc_inc, 0);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -112,12 +110,7 @@ rtctimer_stop(snd_timer_t *timer)
 | 
			
		|||
 */
 | 
			
		||||
static void rtctimer_interrupt(void *private_data)
 | 
			
		||||
{
 | 
			
		||||
	int ticks;
 | 
			
		||||
 | 
			
		||||
	atomic_inc(&rtc_inc);
 | 
			
		||||
	ticks = atomic_read(&rtc_inc);
 | 
			
		||||
	snd_timer_interrupt((snd_timer_t*)private_data, ticks);
 | 
			
		||||
	atomic_sub(ticks, &rtc_inc);
 | 
			
		||||
	snd_timer_interrupt(private_data, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue