Skip to content

Commit ba2375a

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[ALSA] Remove xxx_t typedefs: ISA CS423x
Modules: CS4231 driver,CS4236+ driver Remove xxx_t typedefs from the ISA CS423x drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent c8ff664 commit ba2375a

5 files changed

Lines changed: 215 additions & 217 deletions

File tree

‎include/sound/cs4231.h‎

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,7 @@
217217
#define CS4231_HWSHARE_DMA1 (1<<1)
218218
#define CS4231_HWSHARE_DMA2 (1<<2)
219219

220-
typedef struct _snd_cs4231 cs4231_t;
221-
222-
struct _snd_cs4231 {
220+
struct snd_cs4231 {
223221
unsigned long port; /* base i/o port */
224222
struct resource *res_port;
225223
unsigned long cport; /* control base i/o port (CS4236) */
@@ -234,11 +232,11 @@ struct _snd_cs4231 {
234232
unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
235233
ebus_flag:1; /* SPARC: EBUS present */
236234

237-
snd_card_t *card;
238-
snd_pcm_t *pcm;
239-
snd_pcm_substream_t *playback_substream;
240-
snd_pcm_substream_t *capture_substream;
241-
snd_timer_t *timer;
235+
struct snd_card *card;
236+
struct snd_pcm *pcm;
237+
struct snd_pcm_substream *playback_substream;
238+
struct snd_pcm_substream *capture_substream;
239+
struct snd_timer *timer;
242240

243241
unsigned char image[32]; /* registers image */
244242
unsigned char eimage[32]; /* extended registers image */
@@ -253,52 +251,52 @@ struct _snd_cs4231 {
253251
struct semaphore mce_mutex;
254252
struct semaphore open_mutex;
255253

256-
int (*rate_constraint) (snd_pcm_runtime_t *runtime);
257-
void (*set_playback_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char pdfr);
258-
void (*set_capture_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char cdfr);
259-
void (*trigger) (cs4231_t *chip, unsigned int what, int start);
254+
int (*rate_constraint) (struct snd_pcm_runtime *runtime);
255+
void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr);
256+
void (*set_capture_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char cdfr);
257+
void (*trigger) (struct snd_cs4231 *chip, unsigned int what, int start);
260258
#ifdef CONFIG_PM
261-
void (*suspend) (cs4231_t *chip);
262-
void (*resume) (cs4231_t *chip);
259+
void (*suspend) (struct snd_cs4231 *chip);
260+
void (*resume) (struct snd_cs4231 *chip);
263261
#endif
264262
void *dma_private_data;
265-
int (*claim_dma) (cs4231_t *chip, void *dma_private_data, int dma);
266-
int (*release_dma) (cs4231_t *chip, void *dma_private_data, int dma);
263+
int (*claim_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
264+
int (*release_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
267265
};
268266

269267
/* exported functions */
270268

271-
void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char val);
272-
unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg);
273-
void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val);
274-
unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg);
275-
void snd_cs4231_mce_up(cs4231_t *chip);
276-
void snd_cs4231_mce_down(cs4231_t *chip);
269+
void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
270+
unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg);
271+
void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
272+
unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg);
273+
void snd_cs4231_mce_up(struct snd_cs4231 *chip);
274+
void snd_cs4231_mce_down(struct snd_cs4231 *chip);
277275

278276
irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs);
279277

280-
const char *snd_cs4231_chip_id(cs4231_t *chip);
278+
const char *snd_cs4231_chip_id(struct snd_cs4231 *chip);
281279

282-
int snd_cs4231_create(snd_card_t * card,
280+
int snd_cs4231_create(struct snd_card *card,
283281
unsigned long port,
284282
unsigned long cport,
285283
int irq, int dma1, int dma2,
286284
unsigned short hardware,
287285
unsigned short hwshare,
288-
cs4231_t ** rchip);
289-
int snd_cs4231_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm);
290-
int snd_cs4231_timer(cs4231_t * chip, int device, snd_timer_t **rtimer);
291-
int snd_cs4231_mixer(cs4231_t * chip);
286+
struct snd_cs4231 ** rchip);
287+
int snd_cs4231_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
288+
int snd_cs4231_timer(struct snd_cs4231 * chip, int device, struct snd_timer **rtimer);
289+
int snd_cs4231_mixer(struct snd_cs4231 * chip);
292290

293-
int snd_cs4236_create(snd_card_t * card,
291+
int snd_cs4236_create(struct snd_card *card,
294292
unsigned long port,
295293
unsigned long cport,
296294
int irq, int dma1, int dma2,
297295
unsigned short hardware,
298296
unsigned short hwshare,
299-
cs4231_t ** rchip);
300-
int snd_cs4236_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm);
301-
int snd_cs4236_mixer(cs4231_t * chip);
297+
struct snd_cs4231 ** rchip);
298+
int snd_cs4236_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
299+
int snd_cs4236_mixer(struct snd_cs4231 * chip);
302300

303301
/*
304302
* mixer library
@@ -310,18 +308,18 @@ int snd_cs4236_mixer(cs4231_t * chip);
310308
.get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \
311309
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
312310

313-
int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
314-
int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
315-
int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
311+
int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
312+
int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
313+
int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
316314

317315
#define CS4231_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \
318316
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
319317
.info = snd_cs4231_info_double, \
320318
.get = snd_cs4231_get_double, .put = snd_cs4231_put_double, \
321319
.private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
322320

323-
int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
324-
int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
325-
int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
321+
int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
322+
int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
323+
int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
326324

327325
#endif /* __SOUND_CS4231_H */

‎sound/isa/cs423x/cs4231.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver.");
6464
module_param_array(dma2, int, NULL, 0444);
6565
MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver.");
6666

67-
static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
67+
static struct snd_card *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
6868

6969

7070
static int __init snd_card_cs4231_probe(int dev)
7171
{
72-
snd_card_t *card;
72+
struct snd_card *card;
7373
struct snd_card_cs4231 *acard;
74-
snd_pcm_t *pcm = NULL;
75-
cs4231_t *chip;
74+
struct snd_pcm *pcm = NULL;
75+
struct snd_cs4231 *chip;
7676
int err;
7777

7878
if (port[dev] == SNDRV_AUTO_PORT) {

0 commit comments

Comments
 (0)