X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sound%2Fisa%2Fwavefront%2Fwavefront_synth.c;h=68aa091e89617b9d6bb8915d96fda8810138c669;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=0c3c951009d85682de4a82f74c75b380032c77e6;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 0c3c95100..68aa091e8 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -115,18 +115,11 @@ MODULE_PARM_DESC(osrun_time, "how many seconds to wait for the ICS2115 OS"); #ifdef WF_DEBUG -#if defined(NEW_MACRO_VARARGS) || __GNUC__ >= 3 #define DPRINT(cond, ...) \ if ((dev->debug & (cond)) == (cond)) { \ snd_printk (__VA_ARGS__); \ } #else -#define DPRINT(cond, args...) \ - if ((dev->debug & (cond)) == (cond)) { \ - snd_printk (args); \ - } -#endif -#else #define DPRINT(cond, args...) #endif /* WF_DEBUG */ @@ -144,13 +137,13 @@ MODULE_PARM_DESC(osrun_time, "how many seconds to wait for the ICS2115 OS"); static int wavefront_delete_sample (snd_wavefront_t *, int sampnum); static int wavefront_find_free_sample (snd_wavefront_t *); -typedef struct { +struct wavefront_command { int cmd; char *action; unsigned int read_cnt; unsigned int write_cnt; int need_ack; -} wavefront_command; +}; static struct { int errno; @@ -170,7 +163,7 @@ static struct { #define NEEDS_ACK 1 -static wavefront_command wavefront_commands[] = { +static struct wavefront_command wavefront_commands[] = { { WFC_SET_SYNTHVOL, "set synthesizer volume", 0, 1, NEEDS_ACK }, { WFC_GET_SYNTHVOL, "get synthesizer volume", 1, 0, 0}, { WFC_SET_NVOICES, "set number of voices", 0, 1, NEEDS_ACK }, @@ -249,7 +242,7 @@ wavefront_errorstr (int errnum) return "Unknown WaveFront error"; } -static wavefront_command * +static struct wavefront_command * wavefront_get_command (int cmd) { @@ -261,7 +254,7 @@ wavefront_get_command (int cmd) } } - return (wavefront_command *) 0; + return NULL; } static inline int @@ -275,8 +268,7 @@ static int wavefront_sleep (int limit) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(limit); + schedule_timeout_interruptible(limit); return signal_pending(current); } @@ -346,9 +338,9 @@ snd_wavefront_cmd (snd_wavefront_t *dev, int ack; unsigned int i; int c; - wavefront_command *wfcmd; + struct wavefront_command *wfcmd; - if ((wfcmd = wavefront_get_command (cmd)) == (wavefront_command *) 0) { + if ((wfcmd = wavefront_get_command (cmd)) == NULL) { snd_printk ("command 0x%x not supported.\n", cmd); return 1; @@ -874,7 +866,7 @@ wavefront_send_sample (snd_wavefront_t *dev, divided by 2. */ - u16 sample_short; + u16 sample_short = 0; u32 length; u16 __user *data_end = NULL; unsigned int i; @@ -1626,7 +1618,7 @@ wavefront_synth_control (snd_wavefront_card_t *acard, } int -snd_wavefront_synth_open (snd_hwdep_t *hw, struct file *file) +snd_wavefront_synth_open (struct snd_hwdep *hw, struct file *file) { if (!try_module_get(hw->card->module)) @@ -1636,7 +1628,7 @@ snd_wavefront_synth_open (snd_hwdep_t *hw, struct file *file) } int -snd_wavefront_synth_release (snd_hwdep_t *hw, struct file *file) +snd_wavefront_synth_release (struct snd_hwdep *hw, struct file *file) { module_put(hw->card->module); @@ -1644,18 +1636,18 @@ snd_wavefront_synth_release (snd_hwdep_t *hw, struct file *file) } int -snd_wavefront_synth_ioctl (snd_hwdep_t *hw, struct file *file, +snd_wavefront_synth_ioctl (struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg) { - snd_card_t *card; + struct snd_card *card; snd_wavefront_t *dev; snd_wavefront_card_t *acard; wavefront_control *wc; void __user *argp = (void __user *)arg; int err; - card = (snd_card_t *) hw->card; + card = (struct snd_card *) hw->card; snd_assert(card != NULL, return -ENODEV); @@ -1788,8 +1780,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev, outb (val,port); spin_unlock_irq(&dev->irq_lock); while (1) { - set_current_state(TASK_INTERRUPTIBLE); - if ((timeout = schedule_timeout(timeout)) == 0) + if ((timeout = schedule_timeout_interruptible(timeout)) == 0) return; if (dev->irq_ok) return;