git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
sound
/
oss
/
sys_timer.c
diff --git
a/sound/oss/sys_timer.c
b/sound/oss/sys_timer.c
index
459c174
..
c9d0451
100644
(file)
--- a/
sound/oss/sys_timer.c
+++ b/
sound/oss/sys_timer.c
@@
-27,9
+27,8
@@
static volatile unsigned long next_event_time;
static unsigned long prev_event_time;
static void poll_def_tmr(unsigned long dummy);
static unsigned long prev_event_time;
static void poll_def_tmr(unsigned long dummy);
-static spinlock_t lock=SPIN_LOCK_UNLOCKED;
-
-static struct timer_list def_tmr = TIMER_INITIALIZER(poll_def_tmr, 0, 0);
+static DEFINE_SPINLOCK(lock);
+static DEFINE_TIMER(def_tmr, poll_def_tmr, 0, 0);
static unsigned long
tmr2ticks(int tmr_value)
static unsigned long
tmr2ticks(int tmr_value)
@@
-191,13
+190,14
@@
def_tmr_get_time(int dev)
}
/* same as sound_timer.c:timer_ioctl!? */
}
/* same as sound_timer.c:timer_ioctl!? */
-static int def_tmr_ioctl(int dev, unsigned int cmd,
caddr_t
arg)
+static int def_tmr_ioctl(int dev, unsigned int cmd,
void __user *
arg)
{
{
+ int __user *p = arg;
int val;
switch (cmd) {
case SNDCTL_TMR_SOURCE:
int val;
switch (cmd) {
case SNDCTL_TMR_SOURCE:
- return __put_user(TMR_INTERNAL,
(int *)arg
);
+ return __put_user(TMR_INTERNAL,
p
);
case SNDCTL_TMR_START:
tmr_reset();
case SNDCTL_TMR_START:
tmr_reset();
@@
-213,7
+213,7
@@
static int def_tmr_ioctl(int dev, unsigned int cmd, caddr_t arg)
return 0;
case SNDCTL_TMR_TIMEBASE:
return 0;
case SNDCTL_TMR_TIMEBASE:
- if (__get_user(val,
(int *)arg
))
+ if (__get_user(val,
p
))
return -EFAULT;
if (val) {
if (val < 1)
return -EFAULT;
if (val) {
if (val < 1)
@@
-222,10
+222,10
@@
static int def_tmr_ioctl(int dev, unsigned int cmd, caddr_t arg)
val = 1000;
curr_timebase = val;
}
val = 1000;
curr_timebase = val;
}
- return __put_user(curr_timebase,
(int *)arg
);
+ return __put_user(curr_timebase,
p
);
case SNDCTL_TMR_TEMPO:
case SNDCTL_TMR_TEMPO:
- if (__get_user(val,
(int *)arg
))
+ if (__get_user(val,
p
))
return -EFAULT;
if (val) {
if (val < 8)
return -EFAULT;
if (val) {
if (val < 8)
@@
-238,18
+238,18
@@
static int def_tmr_ioctl(int dev, unsigned int cmd, caddr_t arg)
curr_tempo = val;
reprogram_timer();
}
curr_tempo = val;
reprogram_timer();
}
- return __put_user(curr_tempo,
(int *)arg
);
+ return __put_user(curr_tempo,
p
);
case SNDCTL_SEQ_CTRLRATE:
case SNDCTL_SEQ_CTRLRATE:
- if (__get_user(val,
(int *)arg
))
+ if (__get_user(val,
p
))
return -EFAULT;
if (val != 0) /* Can't change */
return -EINVAL;
val = ((curr_tempo * curr_timebase) + 30) / 60;
return -EFAULT;
if (val != 0) /* Can't change */
return -EINVAL;
val = ((curr_tempo * curr_timebase) + 30) / 60;
- return __put_user(val,
(int *)arg
);
+ return __put_user(val,
p
);
case SNDCTL_SEQ_GETTIME:
case SNDCTL_SEQ_GETTIME:
- return __put_user(curr_ticks,
(int *)arg
);
+ return __put_user(curr_ticks,
p
);
case SNDCTL_TMR_METRONOME:
/* NOP */
case SNDCTL_TMR_METRONOME:
/* NOP */