#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 */
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;
#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 },
return "Unknown WaveFront error";
}
-static wavefront_command *
+static struct wavefront_command *
wavefront_get_command (int cmd)
{
}
}
- return (wavefront_command *) 0;
+ return NULL;
}
static inline int
wavefront_sleep (int limit)
{
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(limit);
+ schedule_timeout_interruptible(limit);
return signal_pending(current);
}
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;
divided by 2.
*/
- u16 sample_short;
+ u16 sample_short = 0;
u32 length;
u16 __user *data_end = NULL;
unsigned int i;
}
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))
}
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);
}
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);
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;