Commit 47f2769b authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: pci: 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: default avatarJaroslav Kysela <perex@perex.cz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5a170e9e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -741,10 +741,8 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe
static void
snd_ad1889_proc_init(struct snd_ad1889 *chip)
{
	struct snd_info_entry *entry;

	if (!snd_card_proc_new(chip->card, chip->card->driver, &entry))
		snd_info_set_text_ops(entry, chip, snd_ad1889_proc_read);
	snd_card_ro_proc_new(chip->card, chip->card->driver,
			     chip, snd_ad1889_proc_read);
}

static const struct ac97_quirk ac97_quirks[] = {
+1 −4
Original line number Diff line number Diff line
@@ -481,8 +481,5 @@ static void snd_ak4531_proc_read(struct snd_info_entry *entry,
static void
snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531)
{
	struct snd_info_entry *entry;

	if (! snd_card_proc_new(card, "ak4531", &entry))
		snd_info_set_text_ops(entry, ak4531, snd_ak4531_proc_read);
	snd_card_ro_proc_new(card, "ak4531", ak4531, snd_ak4531_proc_read);
}
+1 −3
Original line number Diff line number Diff line
@@ -2049,9 +2049,7 @@ static void snd_ali_proc_read(struct snd_info_entry *entry,

static void snd_ali_proc_init(struct snd_ali *codec)
{
	struct snd_info_entry *entry;
	if (!snd_card_proc_new(codec->card, "ali5451", &entry))
		snd_info_set_text_ops(entry, codec, snd_ali_proc_read);
	snd_card_ro_proc_new(codec->card, "ali5451", codec, snd_ali_proc_read);
}

static int snd_ali_resources(struct snd_ali *codec)
+2 −4
Original line number Diff line number Diff line
@@ -2782,10 +2782,8 @@ snd_asihpi_proc_read(struct snd_info_entry *entry,

static void snd_asihpi_proc_init(struct snd_card_asihpi *asihpi)
{
	struct snd_info_entry *entry;

	if (!snd_card_proc_new(asihpi->card, "info", &entry))
		snd_info_set_text_ops(entry, asihpi, snd_asihpi_proc_read);
	snd_card_ro_proc_new(asihpi->card, "info", asihpi,
			     snd_asihpi_proc_read);
}

/*------------------------------------------------------------
+1 −4
Original line number Diff line number Diff line
@@ -1543,10 +1543,7 @@ static void snd_atiixp_proc_read(struct snd_info_entry *entry,

static void snd_atiixp_proc_init(struct atiixp *chip)
{
	struct snd_info_entry *entry;

	if (! snd_card_proc_new(chip->card, "atiixp", &entry))
		snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read);
	snd_card_ro_proc_new(chip->card, "atiixp", chip, snd_atiixp_proc_read);
}


Loading