git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sound: seq_midi: do not send MIDI reset when closing
[safe/jmp/linux-2.6]
/
sound
/
core
/
rtctimer.c
diff --git
a/sound/core/rtctimer.c
b/sound/core/rtctimer.c
index
9f7b32e
..
0851cd1
100644
(file)
--- a/
sound/core/rtctimer.c
+++ b/
sound/core/rtctimer.c
@@
-20,10
+20,10
@@
*
*/
*
*/
-#include <sound/driver.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
+#include <linux/log2.h>
#include <sound/core.h>
#include <sound/timer.h>
#include <sound/core.h>
#include <sound/timer.h>
@@
-91,7
+91,8
@@
static int
rtctimer_start(struct snd_timer *timer)
{
rtc_task_t *rtc = timer->private_data;
rtctimer_start(struct snd_timer *timer)
{
rtc_task_t *rtc = timer->private_data;
- snd_assert(rtc != NULL, return -EINVAL);
+ if (snd_BUG_ON(!rtc))
+ return -EINVAL;
rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq);
rtc_control(rtc, RTC_PIE_ON, 0);
return 0;
rtc_control(rtc, RTC_IRQP_SET, rtctimer_freq);
rtc_control(rtc, RTC_PIE_ON, 0);
return 0;
@@
-101,7
+102,8
@@
static int
rtctimer_stop(struct snd_timer *timer)
{
rtc_task_t *rtc = timer->private_data;
rtctimer_stop(struct snd_timer *timer)
{
rtc_task_t *rtc = timer->private_data;
- snd_assert(rtc != NULL, return -EINVAL);
+ if (snd_BUG_ON(!rtc))
+ return -EINVAL;
rtc_control(rtc, RTC_PIE_OFF, 0);
return 0;
}
rtc_control(rtc, RTC_PIE_OFF, 0);
return 0;
}
@@
-116,7
+118,7
@@
static void rtctimer_tasklet(unsigned long data)
*/
static void rtctimer_interrupt(void *private_data)
{
*/
static void rtctimer_interrupt(void *private_data)
{
- tasklet_
hi_
schedule(private_data);
+ tasklet_schedule(private_data);
}
}
@@
-129,7
+131,7
@@
static int __init rtctimer_init(void)
struct snd_timer *timer;
if (rtctimer_freq < 2 || rtctimer_freq > 8192 ||
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;
snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n",
rtctimer_freq);
return -EINVAL;