Skip to content

Commit

Permalink
[ALSA] Remove xxx_t typedefs: OSS-emulation
Browse files Browse the repository at this point in the history
Modules: ALSA Core

Remove xxx_t typedefs from the core OSS-emulation codes.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 877211f commit 174c1f6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
11 changes: 6 additions & 5 deletions sound/core/info_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

static DECLARE_MUTEX(strings);
static char *snd_sndstat_strings[SNDRV_CARDS][SNDRV_OSS_INFO_DEV_COUNT];
static snd_info_entry_t *snd_sndstat_proc_entry;
static struct snd_info_entry *snd_sndstat_proc_entry;

int snd_oss_info_register(int dev, int num, char *string)
{
Expand All @@ -63,9 +63,9 @@ int snd_oss_info_register(int dev, int num, char *string)
return 0;
}

extern void snd_card_info_read_oss(snd_info_buffer_t * buffer);
extern void snd_card_info_read_oss(struct snd_info_buffer *buffer);

static int snd_sndstat_show_strings(snd_info_buffer_t * buf, char *id, int dev)
static int snd_sndstat_show_strings(struct snd_info_buffer *buf, char *id, int dev)
{
int idx, ok = -1;
char *str;
Expand All @@ -88,7 +88,8 @@ static int snd_sndstat_show_strings(snd_info_buffer_t * buf, char *id, int dev)
return ok;
}

static void snd_sndstat_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
static void snd_sndstat_proc_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_iprintf(buffer, "Sound Driver:3.8.1a-980706 (ALSA v" CONFIG_SND_VERSION " emulation code)\n");
snd_iprintf(buffer, "Kernel: %s %s %s %s %s\n",
Expand All @@ -111,7 +112,7 @@ static void snd_sndstat_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * b

int snd_info_minor_register(void)
{
snd_info_entry_t *entry;
struct snd_info_entry *entry;

memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings));
if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", snd_oss_root)) != NULL) {
Expand Down
30 changes: 16 additions & 14 deletions sound/core/sound_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ static struct list_head snd_oss_minors_hash[SNDRV_CARDS];

static DECLARE_MUTEX(sound_oss_mutex);

static snd_minor_t *snd_oss_minor_search(int minor)
static struct snd_minor *snd_oss_minor_search(int minor)
{
struct list_head *list;
snd_minor_t *mptr;
struct snd_minor *mptr;

list_for_each(list, &snd_oss_minors_hash[SNDRV_MINOR_OSS_CARD(minor)]) {
mptr = list_entry(list, snd_minor_t, list);
mptr = list_entry(list, struct snd_minor, list);
if (mptr->number == minor)
return mptr;
}
return NULL;
}

static int snd_oss_kernel_minor(int type, snd_card_t * card, int dev)
static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
{
int minor;

Expand Down Expand Up @@ -90,19 +90,20 @@ static int snd_oss_kernel_minor(int type, snd_card_t * card, int dev)
return minor;
}

int snd_register_oss_device(int type, snd_card_t * card, int dev, snd_minor_t * reg, const char *name)
int snd_register_oss_device(int type, struct snd_card *card, int dev,
struct snd_minor * reg, const char *name)
{
int minor = snd_oss_kernel_minor(type, card, dev);
int minor_unit;
snd_minor_t *preg;
struct snd_minor *preg;
int cidx = SNDRV_MINOR_OSS_CARD(minor);
int track2 = -1;
int register1 = -1, register2 = -1;
struct device *carddev = NULL;

if (minor < 0)
return minor;
preg = (snd_minor_t *)kmalloc(sizeof(snd_minor_t), GFP_KERNEL);
preg = (struct snd_minor *)kmalloc(sizeof(struct snd_minor), GFP_KERNEL);
if (preg == NULL)
return -ENOMEM;
*preg = *reg;
Expand Down Expand Up @@ -146,12 +147,12 @@ int snd_register_oss_device(int type, snd_card_t * card, int dev, snd_minor_t *
return -EBUSY;
}

int snd_unregister_oss_device(int type, snd_card_t * card, int dev)
int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
{
int minor = snd_oss_kernel_minor(type, card, dev);
int cidx = SNDRV_MINOR_OSS_CARD(minor);
int track2 = -1;
snd_minor_t *mptr;
struct snd_minor *mptr;

if (minor < 0)
return minor;
Expand Down Expand Up @@ -187,18 +188,19 @@ int snd_unregister_oss_device(int type, snd_card_t * card, int dev)

#ifdef CONFIG_PROC_FS

static snd_info_entry_t *snd_minor_info_oss_entry = NULL;
static struct snd_info_entry *snd_minor_info_oss_entry = NULL;

static void snd_minor_info_oss_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
static void snd_minor_info_oss_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
int card, dev;
struct list_head *list;
snd_minor_t *mptr;
struct snd_minor *mptr;

down(&sound_oss_mutex);
for (card = 0; card < SNDRV_CARDS; card++) {
list_for_each(list, &snd_oss_minors_hash[card]) {
mptr = list_entry(list, snd_minor_t, list);
mptr = list_entry(list, struct snd_minor, list);
dev = SNDRV_MINOR_OSS_DEVICE(mptr->number);
if (dev != SNDRV_MINOR_OSS_SNDSTAT &&
dev != SNDRV_MINOR_OSS_SEQUENCER &&
Expand All @@ -216,7 +218,7 @@ static void snd_minor_info_oss_read(snd_info_entry_t *entry, snd_info_buffer_t *
int __init snd_minor_info_oss_init(void)
{
#ifdef CONFIG_PROC_FS
snd_info_entry_t *entry;
struct snd_info_entry *entry;

entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root);
if (entry) {
Expand Down

0 comments on commit 174c1f6

Please sign in to comment.