aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/rtctimer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c
index 9f7b32e1ccde..7cd5e8f5d4ce 100644
--- a/sound/core/rtctimer.c
+++ b/sound/core/rtctimer.c
@@ -24,6 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
27#include <linux/log2.h>
27#include <sound/core.h> 28#include <sound/core.h>
28#include <sound/timer.h> 29#include <sound/timer.h>
29 30
@@ -129,7 +130,7 @@ static int __init rtctimer_init(void)
129 struct snd_timer *timer; 130 struct snd_timer *timer;
130 131
131 if (rtctimer_freq < 2 || rtctimer_freq > 8192 || 132 if (rtctimer_freq < 2 || rtctimer_freq > 8192 ||
132 (rtctimer_freq & (rtctimer_freq - 1)) != 0) { 133 !is_power_of_2(rtctimer_freq)) {
133 snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n", 134 snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n",
134 rtctimer_freq); 135 rtctimer_freq);
135 return -EINVAL; 136 return -EINVAL;