diff options
Diffstat (limited to 'sound/core/timer.c')
| -rw-r--r-- | sound/core/timer.c | 21 | 
1 files changed, 10 insertions, 11 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 6ddcf06f52f..777a45e08e5 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -35,9 +35,9 @@  #include <sound/initval.h>  #include <linux/kmod.h> -#if defined(CONFIG_SND_HRTIMER) || defined(CONFIG_SND_HRTIMER_MODULE) +#if IS_ENABLED(CONFIG_SND_HRTIMER)  #define DEFAULT_TIMER_LIMIT 4 -#elif defined(CONFIG_SND_RTCTIMER) || defined(CONFIG_SND_RTCTIMER_MODULE) +#elif IS_ENABLED(CONFIG_SND_RTCTIMER)  #define DEFAULT_TIMER_LIMIT 2  #else  #define DEFAULT_TIMER_LIMIT 1 @@ -240,7 +240,8 @@ int snd_timer_open(struct snd_timer_instance **ti,  		/* open a slave instance */  		if (tid->dev_sclass <= SNDRV_TIMER_SCLASS_NONE ||  		    tid->dev_sclass > SNDRV_TIMER_SCLASS_OSS_SEQUENCER) { -			snd_printd("invalid slave class %i\n", tid->dev_sclass); +			pr_debug("ALSA: timer: invalid slave class %i\n", +				 tid->dev_sclass);  			return -EINVAL;  		}  		mutex_lock(®ister_mutex); @@ -389,7 +390,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)  	struct timespec tstamp;  	if (timer_tstamp_monotonic) -		do_posix_clock_monotonic_gettime(&tstamp); +		ktime_get_ts(&tstamp);  	else  		getnstimeofday(&tstamp);  	if (snd_BUG_ON(event < SNDRV_TIMER_EVENT_START || @@ -774,7 +775,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,  		*rtimer = NULL;  	timer = kzalloc(sizeof(*timer), GFP_KERNEL);  	if (timer == NULL) { -		snd_printk(KERN_ERR "timer: cannot allocate\n"); +		pr_err("ALSA: timer: cannot allocate\n");  		return -ENOMEM;  	}  	timer->tmr_class = tid->dev_class; @@ -813,7 +814,7 @@ static int snd_timer_free(struct snd_timer *timer)  	if (! list_empty(&timer->open_list_head)) {  		struct list_head *p, *n;  		struct snd_timer_instance *ti; -		snd_printk(KERN_WARNING "timer %p is busy?\n", timer); +		pr_warn("ALSA: timer %p is busy?\n", timer);  		list_for_each_safe(p, n, &timer->open_list_head) {  			list_del_init(p);  			ti = list_entry(p, struct snd_timer_instance, open_list); @@ -1202,7 +1203,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,  	}  	if (tu->last_resolution != resolution || ticks > 0) {  		if (timer_tstamp_monotonic) -			do_posix_clock_monotonic_gettime(&tstamp); +			ktime_get_ts(&tstamp);  		else  			getnstimeofday(&tstamp);  	} @@ -1955,12 +1956,10 @@ static int __init alsa_timer_init(void)  #endif  	if ((err = snd_timer_register_system()) < 0) -		snd_printk(KERN_ERR "unable to register system timer (%i)\n", -			   err); +		pr_err("ALSA: unable to register system timer (%i)\n", err);  	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0,  				       &snd_timer_f_ops, NULL, "timer")) < 0) -		snd_printk(KERN_ERR "unable to register timer device (%i)\n", -			   err); +		pr_err("ALSA: unable to register timer device (%i)\n", err);  	snd_timer_proc_init();  	return 0;  }  | 
