forked from luck/tmp_suning_uos_patched
ALSA: isa: Clean up with new procfs helpers
Simplify the proc fs creation code with new helper functions, snd_card_ro_proc_new() and snd_card_rw_proc_new(). Just a code refactoring and no functional changes. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
815d808c7b
commit
1bac5e1c81
|
@ -140,10 +140,7 @@ static void snd_gus_irq_info_read(struct snd_info_entry *entry,
|
|||
|
||||
void snd_gus_irq_profile_init(struct snd_gus_card *gus)
|
||||
{
|
||||
struct snd_info_entry *entry;
|
||||
|
||||
if (! snd_card_proc_new(gus->card, "gusirq", &entry))
|
||||
snd_info_set_text_ops(entry, gus, snd_gus_irq_info_read);
|
||||
snd_card_ro_proc_new(gus->card, "gusirq", gus, snd_gus_irq_info_read);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -238,9 +238,6 @@ int snd_gf1_mem_init(struct snd_gus_card * gus)
|
|||
{
|
||||
struct snd_gf1_mem *alloc;
|
||||
struct snd_gf1_mem_block block;
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
struct snd_info_entry *entry;
|
||||
#endif
|
||||
|
||||
alloc = &gus->gf1.mem_alloc;
|
||||
mutex_init(&alloc->memory_mutex);
|
||||
|
@ -263,8 +260,7 @@ int snd_gf1_mem_init(struct snd_gus_card * gus)
|
|||
if (snd_gf1_mem_xalloc(alloc, &block) == NULL)
|
||||
return -ENOMEM;
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
if (! snd_card_proc_new(gus->card, "gusmem", &entry))
|
||||
snd_info_set_text_ops(entry, gus, snd_gf1_mem_info_read);
|
||||
snd_card_ro_proc_new(gus->card, "gusmem", gus, snd_gf1_mem_info_read);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -997,10 +997,7 @@ static void snd_miro_proc_read(struct snd_info_entry * entry,
|
|||
static void snd_miro_proc_init(struct snd_card *card,
|
||||
struct snd_miro *miro)
|
||||
{
|
||||
struct snd_info_entry *entry;
|
||||
|
||||
if (!snd_card_proc_new(card, "miro", &entry))
|
||||
snd_info_set_text_ops(entry, miro, snd_miro_proc_read);
|
||||
snd_card_ro_proc_new(card, "miro", miro, snd_miro_proc_read);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1126,10 +1126,9 @@ static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p)
|
|||
static int init_proc_entry(struct snd_sb_csp * p, int device)
|
||||
{
|
||||
char name[16];
|
||||
struct snd_info_entry *entry;
|
||||
|
||||
sprintf(name, "cspD%d", device);
|
||||
if (! snd_card_proc_new(p->chip->card, name, &entry))
|
||||
snd_info_set_text_ops(entry, p, info_read);
|
||||
snd_card_ro_proc_new(p->chip->card, name, p, info_read);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user