Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62e96a1caab86e0d3688d59fcb6f682cc52d4917 Commit: 62e96a1caab86e0d3688d59fcb6f682cc52d4917 Parent: ac519028a4e7b919eaff65a1535824259df326c6 Author: vignesh babu <[EMAIL PROTECTED]> AuthorDate: Thu Feb 22 13:23:01 2007 +0100 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Fri May 11 16:55:42 2007 +0200
[ALSA] is_power_of_2 in rtctimer.c Replacing (n & (n-1)) in the context of power of 2 checks with is_power_of_2 Signed-off-by: vignesh babu <[EMAIL PROTECTED]> Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/core/rtctimer.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c index 9f7b32e..7cd5e8f 100644 --- a/sound/core/rtctimer.c +++ b/sound/core/rtctimer.c @@ -24,6 +24,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/moduleparam.h> +#include <linux/log2.h> #include <sound/core.h> #include <sound/timer.h> @@ -129,7 +130,7 @@ static int __init rtctimer_init(void) struct snd_timer *timer; if (rtctimer_freq < 2 || rtctimer_freq > 8192 || - (rtctimer_freq & (rtctimer_freq - 1)) != 0) { + !is_power_of_2(rtctimer_freq)) { snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n", rtctimer_freq); return -EINVAL; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html