Commit 68a9edd1 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Takashi Iwai

sound: oss: Remove typedefs wanc_info and wavnc_port_info

The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedefs for wanc_info and
wavnc_port_info.

A simplified version of the Coccinelle semantic patch that finds the case is:

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i
Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 80e7bbac
...@@ -92,7 +92,7 @@ static unsigned short levels[SOUND_MIXER_NRDEVICES] = { ...@@ -92,7 +92,7 @@ static unsigned short levels[SOUND_MIXER_NRDEVICES] = {
0x0000 /* Monitor */ 0x0000 /* Monitor */
}; };
typedef struct { struct wavnc_info {
struct address_info hw; /* hardware */ struct address_info hw; /* hardware */
char *chip_name; char *chip_name;
...@@ -119,7 +119,7 @@ typedef struct { ...@@ -119,7 +119,7 @@ typedef struct {
unsigned int line_mute_state :1;/* set by ioctl or autoselect */ unsigned int line_mute_state :1;/* set by ioctl or autoselect */
unsigned int use_slider :1;/* use slider setting for o/p vol */ unsigned int use_slider :1;/* use slider setting for o/p vol */
#endif #endif
} wavnc_info; };
/* /*
* This is the implementation specific mixer information. * This is the implementation specific mixer information.
...@@ -129,29 +129,30 @@ struct waveartist_mixer_info { ...@@ -129,29 +129,30 @@ struct waveartist_mixer_info {
unsigned int recording_devs; /* Recordable devies */ unsigned int recording_devs; /* Recordable devies */
unsigned int stereo_devs; /* Stereo devices */ unsigned int stereo_devs; /* Stereo devices */
unsigned int (*select_input)(wavnc_info *, unsigned int, unsigned int (*select_input)(struct wavnc_info *, unsigned int,
unsigned char *, unsigned char *); unsigned char *, unsigned char *);
int (*decode_mixer)(wavnc_info *, int, int (*decode_mixer)(struct wavnc_info *, int,
unsigned char, unsigned char); unsigned char, unsigned char);
int (*get_mixer)(wavnc_info *, int); int (*get_mixer)(struct wavnc_info *, int);
}; };
typedef struct wavnc_port_info { struct wavnc_port_info {
int open_mode; int open_mode;
int speed; int speed;
int channels; int channels;
int audio_format; int audio_format;
} wavnc_port_info; };
static int nr_waveartist_devs; static int nr_waveartist_devs;
static wavnc_info adev_info[MAX_AUDIO_DEV]; static struct wavnc_info adev_info[MAX_AUDIO_DEV];
static DEFINE_SPINLOCK(waveartist_lock); static DEFINE_SPINLOCK(waveartist_lock);
#ifndef CONFIG_ARCH_NETWINDER #ifndef CONFIG_ARCH_NETWINDER
#define machine_is_netwinder() 0 #define machine_is_netwinder() 0
#else #else
static struct timer_list vnc_timer; static struct timer_list vnc_timer;
static void vnc_configure_mixer(wavnc_info *devc, unsigned int input_mask); static void vnc_configure_mixer(struct wavnc_info *devc,
unsigned int input_mask);
static int vnc_private_ioctl(int dev, unsigned int cmd, int __user *arg); static int vnc_private_ioctl(int dev, unsigned int cmd, int __user *arg);
static void vnc_slider_tick(unsigned long data); static void vnc_slider_tick(unsigned long data);
#endif #endif
...@@ -169,7 +170,7 @@ waveartist_set_ctlr(struct address_info *hw, unsigned char clear, unsigned char ...@@ -169,7 +170,7 @@ waveartist_set_ctlr(struct address_info *hw, unsigned char clear, unsigned char
/* Toggle IRQ acknowledge line /* Toggle IRQ acknowledge line
*/ */
static inline void static inline void
waveartist_iack(wavnc_info *devc) waveartist_iack(struct wavnc_info *devc)
{ {
unsigned int ctlr_port = devc->hw.io_base + CTLR; unsigned int ctlr_port = devc->hw.io_base + CTLR;
int old_ctlr; int old_ctlr;
...@@ -188,7 +189,7 @@ waveartist_sleep(int timeout_ms) ...@@ -188,7 +189,7 @@ waveartist_sleep(int timeout_ms)
} }
static int static int
waveartist_reset(wavnc_info *devc) waveartist_reset(struct wavnc_info *devc)
{ {
struct address_info *hw = &devc->hw; struct address_info *hw = &devc->hw;
unsigned int timeout, res = -1; unsigned int timeout, res = -1;
...@@ -223,7 +224,7 @@ waveartist_reset(wavnc_info *devc) ...@@ -223,7 +224,7 @@ waveartist_reset(wavnc_info *devc)
* and can send or receive multiple words. * and can send or receive multiple words.
*/ */
static int static int
waveartist_cmd(wavnc_info *devc, waveartist_cmd(struct wavnc_info *devc,
int nr_cmd, unsigned int *cmd, int nr_cmd, unsigned int *cmd,
int nr_resp, unsigned int *resp) int nr_resp, unsigned int *resp)
{ {
...@@ -299,7 +300,7 @@ waveartist_cmd(wavnc_info *devc, ...@@ -299,7 +300,7 @@ waveartist_cmd(wavnc_info *devc,
* Send one command word * Send one command word
*/ */
static inline int static inline int
waveartist_cmd1(wavnc_info *devc, unsigned int cmd) waveartist_cmd1(struct wavnc_info *devc, unsigned int cmd)
{ {
return waveartist_cmd(devc, 1, &cmd, 0, NULL); return waveartist_cmd(devc, 1, &cmd, 0, NULL);
} }
...@@ -308,7 +309,7 @@ waveartist_cmd1(wavnc_info *devc, unsigned int cmd) ...@@ -308,7 +309,7 @@ waveartist_cmd1(wavnc_info *devc, unsigned int cmd)
* Send one command, receive one word * Send one command, receive one word
*/ */
static inline unsigned int static inline unsigned int
waveartist_cmd1_r(wavnc_info *devc, unsigned int cmd) waveartist_cmd1_r(struct wavnc_info *devc, unsigned int cmd)
{ {
unsigned int ret; unsigned int ret;
...@@ -322,7 +323,7 @@ waveartist_cmd1_r(wavnc_info *devc, unsigned int cmd) ...@@ -322,7 +323,7 @@ waveartist_cmd1_r(wavnc_info *devc, unsigned int cmd)
* word (and throw it away) * word (and throw it away)
*/ */
static inline int static inline int
waveartist_cmd2(wavnc_info *devc, unsigned int cmd, unsigned int arg) waveartist_cmd2(struct wavnc_info *devc, unsigned int cmd, unsigned int arg)
{ {
unsigned int vals[2]; unsigned int vals[2];
...@@ -336,7 +337,7 @@ waveartist_cmd2(wavnc_info *devc, unsigned int cmd, unsigned int arg) ...@@ -336,7 +337,7 @@ waveartist_cmd2(wavnc_info *devc, unsigned int cmd, unsigned int arg)
* Send a triple command * Send a triple command
*/ */
static inline int static inline int
waveartist_cmd3(wavnc_info *devc, unsigned int cmd, waveartist_cmd3(struct wavnc_info *devc, unsigned int cmd,
unsigned int arg1, unsigned int arg2) unsigned int arg1, unsigned int arg2)
{ {
unsigned int vals[3]; unsigned int vals[3];
...@@ -349,7 +350,7 @@ waveartist_cmd3(wavnc_info *devc, unsigned int cmd, ...@@ -349,7 +350,7 @@ waveartist_cmd3(wavnc_info *devc, unsigned int cmd,
} }
static int static int
waveartist_getrev(wavnc_info *devc, char *rev) waveartist_getrev(struct wavnc_info *devc, char *rev)
{ {
unsigned int temp[2]; unsigned int temp[2];
unsigned int cmd = WACMD_GETREV; unsigned int cmd = WACMD_GETREV;
...@@ -371,15 +372,15 @@ static void waveartist_trigger(int dev, int state); ...@@ -371,15 +372,15 @@ static void waveartist_trigger(int dev, int state);
static int static int
waveartist_open(int dev, int mode) waveartist_open(int dev, int mode)
{ {
wavnc_info *devc; struct wavnc_info *devc;
wavnc_port_info *portc; struct wavnc_port_info *portc;
unsigned long flags; unsigned long flags;
if (dev < 0 || dev >= num_audiodevs) if (dev < 0 || dev >= num_audiodevs)
return -ENXIO; return -ENXIO;
devc = (wavnc_info *) audio_devs[dev]->devc; devc = (struct wavnc_info *) audio_devs[dev]->devc;
portc = (wavnc_port_info *) audio_devs[dev]->portc; portc = (struct wavnc_port_info *) audio_devs[dev]->portc;
spin_lock_irqsave(&waveartist_lock, flags); spin_lock_irqsave(&waveartist_lock, flags);
if (portc->open_mode || (devc->open_mode & mode)) { if (portc->open_mode || (devc->open_mode & mode)) {
...@@ -404,8 +405,10 @@ waveartist_open(int dev, int mode) ...@@ -404,8 +405,10 @@ waveartist_open(int dev, int mode)
static void static void
waveartist_close(int dev) waveartist_close(int dev)
{ {
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; audio_devs[dev]->devc;
struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&waveartist_lock, flags); spin_lock_irqsave(&waveartist_lock, flags);
...@@ -422,8 +425,10 @@ waveartist_close(int dev) ...@@ -422,8 +425,10 @@ waveartist_close(int dev)
static void static void
waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag) waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag)
{ {
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; struct wavnc_port_info *portc = (struct wavnc_port_info *)
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; audio_devs[dev]->portc;
struct wavnc_info *devc = (struct wavnc_info *)
audio_devs[dev]->devc;
unsigned long flags; unsigned long flags;
unsigned int count = __count; unsigned int count = __count;
...@@ -467,8 +472,10 @@ waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag) ...@@ -467,8 +472,10 @@ waveartist_output_block(int dev, unsigned long buf, int __count, int intrflag)
static void static void
waveartist_start_input(int dev, unsigned long buf, int __count, int intrflag) waveartist_start_input(int dev, unsigned long buf, int __count, int intrflag)
{ {
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; struct wavnc_port_info *portc = (struct wavnc_port_info *)
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; audio_devs[dev]->portc;
struct wavnc_info *devc = (struct wavnc_info *)
audio_devs[dev]->devc;
unsigned long flags; unsigned long flags;
unsigned int count = __count; unsigned int count = __count;
...@@ -514,7 +521,7 @@ waveartist_ioctl(int dev, unsigned int cmd, void __user * arg) ...@@ -514,7 +521,7 @@ waveartist_ioctl(int dev, unsigned int cmd, void __user * arg)
} }
static unsigned int static unsigned int
waveartist_get_speed(wavnc_port_info *portc) waveartist_get_speed(struct wavnc_port_info *portc)
{ {
unsigned int speed; unsigned int speed;
...@@ -542,7 +549,7 @@ waveartist_get_speed(wavnc_port_info *portc) ...@@ -542,7 +549,7 @@ waveartist_get_speed(wavnc_port_info *portc)
} }
static unsigned int static unsigned int
waveartist_get_bits(wavnc_port_info *portc) waveartist_get_bits(struct wavnc_port_info *portc)
{ {
unsigned int bits; unsigned int bits;
...@@ -560,8 +567,10 @@ static int ...@@ -560,8 +567,10 @@ static int
waveartist_prepare_for_input(int dev, int bsize, int bcount) waveartist_prepare_for_input(int dev, int bsize, int bcount)
{ {
unsigned long flags; unsigned long flags;
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; audio_devs[dev]->devc;
struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
unsigned int speed, bits; unsigned int speed, bits;
if (devc->audio_mode) if (devc->audio_mode)
...@@ -615,8 +624,10 @@ static int ...@@ -615,8 +624,10 @@ static int
waveartist_prepare_for_output(int dev, int bsize, int bcount) waveartist_prepare_for_output(int dev, int bsize, int bcount)
{ {
unsigned long flags; unsigned long flags;
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; audio_devs[dev]->devc;
struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
unsigned int speed, bits; unsigned int speed, bits;
/* /*
...@@ -660,8 +671,9 @@ waveartist_prepare_for_output(int dev, int bsize, int bcount) ...@@ -660,8 +671,9 @@ waveartist_prepare_for_output(int dev, int bsize, int bcount)
static void static void
waveartist_halt(int dev) waveartist_halt(int dev)
{ {
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; struct wavnc_port_info *portc = (struct wavnc_port_info *)
wavnc_info *devc; audio_devs[dev]->portc;
struct wavnc_info *devc;
if (portc->open_mode & OPEN_WRITE) if (portc->open_mode & OPEN_WRITE)
waveartist_halt_output(dev); waveartist_halt_output(dev);
...@@ -669,14 +681,15 @@ waveartist_halt(int dev) ...@@ -669,14 +681,15 @@ waveartist_halt(int dev)
if (portc->open_mode & OPEN_READ) if (portc->open_mode & OPEN_READ)
waveartist_halt_input(dev); waveartist_halt_input(dev);
devc = (wavnc_info *) audio_devs[dev]->devc; devc = (struct wavnc_info *) audio_devs[dev]->devc;
devc->audio_mode = 0; devc->audio_mode = 0;
} }
static void static void
waveartist_halt_input(int dev) waveartist_halt_input(int dev)
{ {
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)
audio_devs[dev]->devc;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&waveartist_lock, flags); spin_lock_irqsave(&waveartist_lock, flags);
...@@ -703,7 +716,8 @@ waveartist_halt_input(int dev) ...@@ -703,7 +716,8 @@ waveartist_halt_input(int dev)
static void static void
waveartist_halt_output(int dev) waveartist_halt_output(int dev)
{ {
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)
audio_devs[dev]->devc;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&waveartist_lock, flags); spin_lock_irqsave(&waveartist_lock, flags);
...@@ -727,8 +741,10 @@ waveartist_halt_output(int dev) ...@@ -727,8 +741,10 @@ waveartist_halt_output(int dev)
static void static void
waveartist_trigger(int dev, int state) waveartist_trigger(int dev, int state)
{ {
wavnc_info *devc = (wavnc_info *) audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; audio_devs[dev]->devc;
struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
unsigned long flags; unsigned long flags;
if (debug_flg & DEBUG_TRIGGER) { if (debug_flg & DEBUG_TRIGGER) {
...@@ -764,7 +780,8 @@ waveartist_trigger(int dev, int state) ...@@ -764,7 +780,8 @@ waveartist_trigger(int dev, int state)
static int static int
waveartist_set_speed(int dev, int arg) waveartist_set_speed(int dev, int arg)
{ {
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
if (arg <= 0) if (arg <= 0)
return portc->speed; return portc->speed;
...@@ -782,7 +799,8 @@ waveartist_set_speed(int dev, int arg) ...@@ -782,7 +799,8 @@ waveartist_set_speed(int dev, int arg)
static short static short
waveartist_set_channels(int dev, short arg) waveartist_set_channels(int dev, short arg)
{ {
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
if (arg != 1 && arg != 2) if (arg != 1 && arg != 2)
return portc->channels; return portc->channels;
...@@ -794,7 +812,8 @@ waveartist_set_channels(int dev, short arg) ...@@ -794,7 +812,8 @@ waveartist_set_channels(int dev, short arg)
static unsigned int static unsigned int
waveartist_set_bits(int dev, unsigned int arg) waveartist_set_bits(int dev, unsigned int arg)
{ {
wavnc_port_info *portc = (wavnc_port_info *) audio_devs[dev]->portc; struct wavnc_port_info *portc = (struct wavnc_port_info *)
audio_devs[dev]->portc;
if (arg == 0) if (arg == 0)
return portc->audio_format; return portc->audio_format;
...@@ -829,7 +848,7 @@ static struct audio_driver waveartist_audio_driver = { ...@@ -829,7 +848,7 @@ static struct audio_driver waveartist_audio_driver = {
static irqreturn_t static irqreturn_t
waveartist_intr(int irq, void *dev_id) waveartist_intr(int irq, void *dev_id)
{ {
wavnc_info *devc = dev_id; struct wavnc_info *devc = dev_id;
int irqstatus, status; int irqstatus, status;
spin_lock(&waveartist_lock); spin_lock(&waveartist_lock);
...@@ -912,7 +931,7 @@ static const struct mix_ent mix_devs[SOUND_MIXER_NRDEVICES] = { ...@@ -912,7 +931,7 @@ static const struct mix_ent mix_devs[SOUND_MIXER_NRDEVICES] = {
}; };
static void static void
waveartist_mixer_update(wavnc_info *devc, int whichDev) waveartist_mixer_update(struct wavnc_info *devc, int whichDev)
{ {
unsigned int lev_left, lev_right; unsigned int lev_left, lev_right;
...@@ -973,7 +992,8 @@ waveartist_mixer_update(wavnc_info *devc, int whichDev) ...@@ -973,7 +992,8 @@ waveartist_mixer_update(wavnc_info *devc, int whichDev)
* relevant *_select_input function has done that for us. * relevant *_select_input function has done that for us.
*/ */
static void static void
waveartist_set_adc_mux(wavnc_info *devc, char left_dev, char right_dev) waveartist_set_adc_mux(struct wavnc_info *devc, char left_dev,
char right_dev)
{ {
unsigned int reg_08, reg_09; unsigned int reg_08, reg_09;
...@@ -996,7 +1016,7 @@ waveartist_set_adc_mux(wavnc_info *devc, char left_dev, char right_dev) ...@@ -996,7 +1016,7 @@ waveartist_set_adc_mux(wavnc_info *devc, char left_dev, char right_dev)
* SOUND_MASK_MIC Mic Microphone * SOUND_MASK_MIC Mic Microphone
*/ */
static unsigned int static unsigned int
waveartist_select_input(wavnc_info *devc, unsigned int recmask, waveartist_select_input(struct wavnc_info *devc, unsigned int recmask,
unsigned char *dev_l, unsigned char *dev_r) unsigned char *dev_l, unsigned char *dev_r)
{ {
unsigned int recdev = ADC_MUX_NONE; unsigned int recdev = ADC_MUX_NONE;
...@@ -1024,7 +1044,8 @@ waveartist_select_input(wavnc_info *devc, unsigned int recmask, ...@@ -1024,7 +1044,8 @@ waveartist_select_input(wavnc_info *devc, unsigned int recmask,
} }
static int static int
waveartist_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, waveartist_decode_mixer(struct wavnc_info *devc, int dev,
unsigned char lev_l,
unsigned char lev_r) unsigned char lev_r)
{ {
switch (dev) { switch (dev) {
...@@ -1050,7 +1071,7 @@ waveartist_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, ...@@ -1050,7 +1071,7 @@ waveartist_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l,
return dev; return dev;
} }
static int waveartist_get_mixer(wavnc_info *devc, int dev) static int waveartist_get_mixer(struct wavnc_info *devc, int dev)
{ {
return devc->levels[dev]; return devc->levels[dev];
} }
...@@ -1068,7 +1089,7 @@ static const struct waveartist_mixer_info waveartist_mixer = { ...@@ -1068,7 +1089,7 @@ static const struct waveartist_mixer_info waveartist_mixer = {
}; };
static void static void
waveartist_set_recmask(wavnc_info *devc, unsigned int recmask) waveartist_set_recmask(struct wavnc_info *devc, unsigned int recmask)
{ {
unsigned char dev_l, dev_r; unsigned char dev_l, dev_r;
...@@ -1092,7 +1113,7 @@ waveartist_set_recmask(wavnc_info *devc, unsigned int recmask) ...@@ -1092,7 +1113,7 @@ waveartist_set_recmask(wavnc_info *devc, unsigned int recmask)
} }
static int static int
waveartist_set_mixer(wavnc_info *devc, int dev, unsigned int level) waveartist_set_mixer(struct wavnc_info *devc, int dev, unsigned int level)
{ {
unsigned int lev_left = level & 0x00ff; unsigned int lev_left = level & 0x00ff;
unsigned int lev_right = (level & 0xff00) >> 8; unsigned int lev_right = (level & 0xff00) >> 8;
...@@ -1120,7 +1141,7 @@ waveartist_set_mixer(wavnc_info *devc, int dev, unsigned int level) ...@@ -1120,7 +1141,7 @@ waveartist_set_mixer(wavnc_info *devc, int dev, unsigned int level)
static int static int
waveartist_mixer_ioctl(int dev, unsigned int cmd, void __user * arg) waveartist_mixer_ioctl(int dev, unsigned int cmd, void __user * arg)
{ {
wavnc_info *devc = (wavnc_info *)audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)audio_devs[dev]->devc;
int ret = 0, val, nr; int ret = 0, val, nr;
/* /*
...@@ -1204,7 +1225,7 @@ static struct mixer_operations waveartist_mixer_operations = ...@@ -1204,7 +1225,7 @@ static struct mixer_operations waveartist_mixer_operations =
}; };
static void static void
waveartist_mixer_reset(wavnc_info *devc) waveartist_mixer_reset(struct wavnc_info *devc)
{ {
int i; int i;
...@@ -1241,9 +1262,9 @@ waveartist_mixer_reset(wavnc_info *devc) ...@@ -1241,9 +1262,9 @@ waveartist_mixer_reset(wavnc_info *devc)
waveartist_mixer_update(devc, i); waveartist_mixer_update(devc, i);
} }
static int __init waveartist_init(wavnc_info *devc) static int __init waveartist_init(struct wavnc_info *devc)
{ {
wavnc_port_info *portc; struct wavnc_port_info *portc;
char rev[3], dev_name[64]; char rev[3], dev_name[64];
int my_dev; int my_dev;
...@@ -1261,7 +1282,7 @@ static int __init waveartist_init(wavnc_info *devc) ...@@ -1261,7 +1282,7 @@ static int __init waveartist_init(wavnc_info *devc)
conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq, conf_printf2(dev_name, devc->hw.io_base, devc->hw.irq,
devc->hw.dma, devc->hw.dma2); devc->hw.dma, devc->hw.dma2);
portc = kzalloc(sizeof(wavnc_port_info), GFP_KERNEL); portc = kzalloc(sizeof(struct wavnc_port_info), GFP_KERNEL);
if (portc == NULL) if (portc == NULL)
goto nomem; goto nomem;
...@@ -1330,7 +1351,7 @@ static int __init waveartist_init(wavnc_info *devc) ...@@ -1330,7 +1351,7 @@ static int __init waveartist_init(wavnc_info *devc)
static int __init probe_waveartist(struct address_info *hw_config) static int __init probe_waveartist(struct address_info *hw_config)
{ {
wavnc_info *devc = &adev_info[nr_waveartist_devs]; struct wavnc_info *devc = &adev_info[nr_waveartist_devs];
if (nr_waveartist_devs >= MAX_AUDIO_DEV) { if (nr_waveartist_devs >= MAX_AUDIO_DEV) {
printk(KERN_WARNING "waveartist: too many audio devices\n"); printk(KERN_WARNING "waveartist: too many audio devices\n");
...@@ -1367,7 +1388,7 @@ static int __init probe_waveartist(struct address_info *hw_config) ...@@ -1367,7 +1388,7 @@ static int __init probe_waveartist(struct address_info *hw_config)
static void __init static void __init
attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *mix) attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *mix)
{ {
wavnc_info *devc = &adev_info[nr_waveartist_devs]; struct wavnc_info *devc = &adev_info[nr_waveartist_devs];
/* /*
* NOTE! If irq < 0, there is another driver which has allocated the * NOTE! If irq < 0, there is another driver which has allocated the
...@@ -1410,7 +1431,7 @@ attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *m ...@@ -1410,7 +1431,7 @@ attach_waveartist(struct address_info *hw, const struct waveartist_mixer_info *m
static void __exit unload_waveartist(struct address_info *hw) static void __exit unload_waveartist(struct address_info *hw)
{ {
wavnc_info *devc = NULL; struct wavnc_info *devc = NULL;
int i; int i;
for (i = 0; i < nr_waveartist_devs; i++) for (i = 0; i < nr_waveartist_devs; i++)
...@@ -1478,7 +1499,7 @@ static void __exit unload_waveartist(struct address_info *hw) ...@@ -1478,7 +1499,7 @@ static void __exit unload_waveartist(struct address_info *hw)
#define VNC_DISABLE_AUTOSWITCH 0x80 #define VNC_DISABLE_AUTOSWITCH 0x80
static inline void static inline void
vnc_mute_spkr(wavnc_info *devc) vnc_mute_spkr(struct wavnc_info *devc)
{ {
unsigned long flags; unsigned long flags;
...@@ -1488,7 +1509,7 @@ vnc_mute_spkr(wavnc_info *devc) ...@@ -1488,7 +1509,7 @@ vnc_mute_spkr(wavnc_info *devc)
} }
static void static void
vnc_mute_lout(wavnc_info *devc) vnc_mute_lout(struct wavnc_info *devc)
{ {
unsigned int left, right; unsigned int left, right;
...@@ -1507,7 +1528,7 @@ vnc_mute_lout(wavnc_info *devc) ...@@ -1507,7 +1528,7 @@ vnc_mute_lout(wavnc_info *devc)
} }
static int static int
vnc_volume_slider(wavnc_info *devc) vnc_volume_slider(struct wavnc_info *devc)
{ {
static signed int old_slider_volume; static signed int old_slider_volume;
unsigned long flags; unsigned long flags;
...@@ -1567,7 +1588,7 @@ vnc_volume_slider(wavnc_info *devc) ...@@ -1567,7 +1588,7 @@ vnc_volume_slider(wavnc_info *devc)
* SOUND_MASK_MIC Right Mic Builtin microphone * SOUND_MASK_MIC Right Mic Builtin microphone
*/ */
static unsigned int static unsigned int
netwinder_select_input(wavnc_info *devc, unsigned int recmask, netwinder_select_input(struct wavnc_info *devc, unsigned int recmask,
unsigned char *dev_l, unsigned char *dev_r) unsigned char *dev_l, unsigned char *dev_r)
{ {
unsigned int recdev_l = ADC_MUX_NONE, recdev_r = ADC_MUX_NONE; unsigned int recdev_l = ADC_MUX_NONE, recdev_r = ADC_MUX_NONE;
...@@ -1604,7 +1625,7 @@ netwinder_select_input(wavnc_info *devc, unsigned int recmask, ...@@ -1604,7 +1625,7 @@ netwinder_select_input(wavnc_info *devc, unsigned int recmask,
} }
static int static int
netwinder_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, netwinder_decode_mixer(struct wavnc_info *devc, int dev, unsigned char lev_l,
unsigned char lev_r) unsigned char lev_r)
{ {
switch (dev) { switch (dev) {
...@@ -1643,7 +1664,7 @@ netwinder_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l, ...@@ -1643,7 +1664,7 @@ netwinder_decode_mixer(wavnc_info *devc, int dev, unsigned char lev_l,
return dev; return dev;
} }
static int netwinder_get_mixer(wavnc_info *devc, int dev) static int netwinder_get_mixer(struct wavnc_info *devc, int dev)
{ {
int levels; int levels;
...@@ -1703,7 +1724,7 @@ static const struct waveartist_mixer_info netwinder_mixer = { ...@@ -1703,7 +1724,7 @@ static const struct waveartist_mixer_info netwinder_mixer = {
}; };
static void static void
vnc_configure_mixer(wavnc_info *devc, unsigned int recmask) vnc_configure_mixer(struct wavnc_info *devc, unsigned int recmask)
{ {
if (!devc->no_autoselect) { if (!devc->no_autoselect) {
if (devc->handset_detect) { if (devc->handset_detect) {
...@@ -1729,7 +1750,7 @@ vnc_configure_mixer(wavnc_info *devc, unsigned int recmask) ...@@ -1729,7 +1750,7 @@ vnc_configure_mixer(wavnc_info *devc, unsigned int recmask)
} }
static int static int
vnc_slider(wavnc_info *devc) vnc_slider(struct wavnc_info *devc)
{ {
signed int slider_volume; signed int slider_volume;
unsigned int temp, old_hs, old_td; unsigned int temp, old_hs, old_td;
...@@ -1795,7 +1816,7 @@ vnc_slider_tick(unsigned long data) ...@@ -1795,7 +1816,7 @@ vnc_slider_tick(unsigned long data)
static int static int
vnc_private_ioctl(int dev, unsigned int cmd, int __user * arg) vnc_private_ioctl(int dev, unsigned int cmd, int __user * arg)
{ {
wavnc_info *devc = (wavnc_info *)audio_devs[dev]->devc; struct wavnc_info *devc = (struct wavnc_info *)audio_devs[dev]->devc;
int val; int val;
switch (cmd) { switch (cmd) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment