diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 10:01:39 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-06 12:11:56 -0500 |
commit | 47f2769b4b2e267cba135fc19c89c32d202b1415 (patch) | |
tree | 58078c2d663d901622b6015bbfde465e2dda7e8f | |
parent | 5a170e9e4c74bc7f9aa57861c90e5813d63bfdab (diff) |
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: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
38 files changed, 133 insertions, 278 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index d9c54c08e2db..f333bbf41870 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -741,10 +741,8 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe | |||
741 | static void | 741 | static void |
742 | snd_ad1889_proc_init(struct snd_ad1889 *chip) | 742 | snd_ad1889_proc_init(struct snd_ad1889 *chip) |
743 | { | 743 | { |
744 | struct snd_info_entry *entry; | 744 | snd_card_ro_proc_new(chip->card, chip->card->driver, |
745 | 745 | chip, snd_ad1889_proc_read); | |
746 | if (!snd_card_proc_new(chip->card, chip->card->driver, &entry)) | ||
747 | snd_info_set_text_ops(entry, chip, snd_ad1889_proc_read); | ||
748 | } | 746 | } |
749 | 747 | ||
750 | static const struct ac97_quirk ac97_quirks[] = { | 748 | static const struct ac97_quirk ac97_quirks[] = { |
diff --git a/sound/pci/ak4531_codec.c b/sound/pci/ak4531_codec.c index 2fb1fbba3e5e..11e902cac71b 100644 --- a/sound/pci/ak4531_codec.c +++ b/sound/pci/ak4531_codec.c | |||
@@ -481,8 +481,5 @@ static void snd_ak4531_proc_read(struct snd_info_entry *entry, | |||
481 | static void | 481 | static void |
482 | snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531) | 482 | snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531) |
483 | { | 483 | { |
484 | struct snd_info_entry *entry; | 484 | snd_card_ro_proc_new(card, "ak4531", ak4531, snd_ak4531_proc_read); |
485 | |||
486 | if (! snd_card_proc_new(card, "ak4531", &entry)) | ||
487 | snd_info_set_text_ops(entry, ak4531, snd_ak4531_proc_read); | ||
488 | } | 485 | } |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index e781ccca1793..f7fbe05836b3 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -2049,9 +2049,7 @@ static void snd_ali_proc_read(struct snd_info_entry *entry, | |||
2049 | 2049 | ||
2050 | static void snd_ali_proc_init(struct snd_ali *codec) | 2050 | static void snd_ali_proc_init(struct snd_ali *codec) |
2051 | { | 2051 | { |
2052 | struct snd_info_entry *entry; | 2052 | snd_card_ro_proc_new(codec->card, "ali5451", codec, snd_ali_proc_read); |
2053 | if (!snd_card_proc_new(codec->card, "ali5451", &entry)) | ||
2054 | snd_info_set_text_ops(entry, codec, snd_ali_proc_read); | ||
2055 | } | 2053 | } |
2056 | 2054 | ||
2057 | static int snd_ali_resources(struct snd_ali *codec) | 2055 | static int snd_ali_resources(struct snd_ali *codec) |
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index aad74e809797..32b2f9802479 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -2782,10 +2782,8 @@ snd_asihpi_proc_read(struct snd_info_entry *entry, | |||
2782 | 2782 | ||
2783 | static void snd_asihpi_proc_init(struct snd_card_asihpi *asihpi) | 2783 | static void snd_asihpi_proc_init(struct snd_card_asihpi *asihpi) |
2784 | { | 2784 | { |
2785 | struct snd_info_entry *entry; | 2785 | snd_card_ro_proc_new(asihpi->card, "info", asihpi, |
2786 | 2786 | snd_asihpi_proc_read); | |
2787 | if (!snd_card_proc_new(asihpi->card, "info", &entry)) | ||
2788 | snd_info_set_text_ops(entry, asihpi, snd_asihpi_proc_read); | ||
2789 | } | 2787 | } |
2790 | 2788 | ||
2791 | /*------------------------------------------------------------ | 2789 | /*------------------------------------------------------------ |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 7715d26916ac..169763c88f5e 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -1543,10 +1543,7 @@ static void snd_atiixp_proc_read(struct snd_info_entry *entry, | |||
1543 | 1543 | ||
1544 | static void snd_atiixp_proc_init(struct atiixp *chip) | 1544 | static void snd_atiixp_proc_init(struct atiixp *chip) |
1545 | { | 1545 | { |
1546 | struct snd_info_entry *entry; | 1546 | snd_card_ro_proc_new(chip->card, "atiixp", chip, snd_atiixp_proc_read); |
1547 | |||
1548 | if (! snd_card_proc_new(chip->card, "atiixp", &entry)) | ||
1549 | snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); | ||
1550 | } | 1547 | } |
1551 | 1548 | ||
1552 | 1549 | ||
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index a357a8e2e73d..cece66bb3644 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -1170,10 +1170,8 @@ static void snd_atiixp_proc_read(struct snd_info_entry *entry, | |||
1170 | 1170 | ||
1171 | static void snd_atiixp_proc_init(struct atiixp_modem *chip) | 1171 | static void snd_atiixp_proc_init(struct atiixp_modem *chip) |
1172 | { | 1172 | { |
1173 | struct snd_info_entry *entry; | 1173 | snd_card_ro_proc_new(chip->card, "atiixp-modem", chip, |
1174 | 1174 | snd_atiixp_proc_read); | |
1175 | if (! snd_card_proc_new(chip->card, "atiixp-modem", &entry)) | ||
1176 | snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); | ||
1177 | } | 1175 | } |
1178 | 1176 | ||
1179 | 1177 | ||
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index a2c85cc37972..f5b8934db735 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c | |||
@@ -424,30 +424,20 @@ static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry, | |||
424 | 424 | ||
425 | int snd_ca0106_proc_init(struct snd_ca0106 *emu) | 425 | int snd_ca0106_proc_init(struct snd_ca0106 *emu) |
426 | { | 426 | { |
427 | struct snd_info_entry *entry; | 427 | snd_card_ro_proc_new(emu->card, "iec958", emu, snd_ca0106_proc_iec958); |
428 | 428 | snd_card_rw_proc_new(emu->card, "ca0106_reg32", emu, | |
429 | if(! snd_card_proc_new(emu->card, "iec958", &entry)) | 429 | snd_ca0106_proc_reg_read32, |
430 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_iec958); | 430 | snd_ca0106_proc_reg_write32); |
431 | if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) { | 431 | snd_card_ro_proc_new(emu->card, "ca0106_reg16", emu, |
432 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read32); | 432 | snd_ca0106_proc_reg_read16); |
433 | entry->c.text.write = snd_ca0106_proc_reg_write32; | 433 | snd_card_ro_proc_new(emu->card, "ca0106_reg8", emu, |
434 | entry->mode |= 0200; | 434 | snd_ca0106_proc_reg_read8); |
435 | } | 435 | snd_card_rw_proc_new(emu->card, "ca0106_regs1", emu, |
436 | if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry)) | 436 | snd_ca0106_proc_reg_read1, |
437 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read16); | 437 | snd_ca0106_proc_reg_write); |
438 | if(! snd_card_proc_new(emu->card, "ca0106_reg8", &entry)) | 438 | snd_card_rw_proc_new(emu->card, "ca0106_i2c", emu, NULL, |
439 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read8); | 439 | snd_ca0106_proc_i2c_write); |
440 | if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) { | 440 | snd_card_ro_proc_new(emu->card, "ca0106_regs2", emu, |
441 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); | 441 | snd_ca0106_proc_reg_read2); |
442 | entry->c.text.write = snd_ca0106_proc_reg_write; | ||
443 | entry->mode |= 0200; | ||
444 | } | ||
445 | if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { | ||
446 | entry->c.text.write = snd_ca0106_proc_i2c_write; | ||
447 | entry->private_data = emu; | ||
448 | entry->mode |= 0200; | ||
449 | } | ||
450 | if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) | ||
451 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); | ||
452 | return 0; | 442 | return 0; |
453 | } | 443 | } |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 5bbf31c1695c..701be04aed53 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2792,10 +2792,7 @@ static void snd_cmipci_proc_read(struct snd_info_entry *entry, | |||
2792 | 2792 | ||
2793 | static void snd_cmipci_proc_init(struct cmipci *cm) | 2793 | static void snd_cmipci_proc_init(struct cmipci *cm) |
2794 | { | 2794 | { |
2795 | struct snd_info_entry *entry; | 2795 | snd_card_ro_proc_new(cm->card, "cmipci", cm, snd_cmipci_proc_read); |
2796 | |||
2797 | if (! snd_card_proc_new(cm->card, "cmipci", &entry)) | ||
2798 | snd_info_set_text_ops(entry, cm, snd_cmipci_proc_read); | ||
2799 | } | 2796 | } |
2800 | 2797 | ||
2801 | static const struct pci_device_id snd_cmipci_ids[] = { | 2798 | static const struct pci_device_id snd_cmipci_ids[] = { |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index a9fb819cad1d..15bbf9564c82 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -1174,8 +1174,7 @@ static void snd_cs4281_proc_init(struct cs4281 *chip) | |||
1174 | { | 1174 | { |
1175 | struct snd_info_entry *entry; | 1175 | struct snd_info_entry *entry; |
1176 | 1176 | ||
1177 | if (! snd_card_proc_new(chip->card, "cs4281", &entry)) | 1177 | snd_card_ro_proc_new(chip->card, "cs4281", chip, snd_cs4281_proc_read); |
1178 | snd_info_set_text_ops(entry, chip, snd_cs4281_proc_read); | ||
1179 | if (! snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) { | 1178 | if (! snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) { |
1180 | entry->content = SNDRV_INFO_CONTENT_DATA; | 1179 | entry->content = SNDRV_INFO_CONTENT_DATA; |
1181 | entry->private_data = chip; | 1180 | entry->private_data = chip; |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 611589cbdad6..576c7bd03a1a 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -1065,15 +1065,9 @@ static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, | |||
1065 | 1065 | ||
1066 | static int snd_emu10k1x_proc_init(struct emu10k1x *emu) | 1066 | static int snd_emu10k1x_proc_init(struct emu10k1x *emu) |
1067 | { | 1067 | { |
1068 | struct snd_info_entry *entry; | 1068 | snd_card_rw_proc_new(emu->card, "emu10k1x_regs", emu, |
1069 | 1069 | snd_emu10k1x_proc_reg_read, | |
1070 | if(! snd_card_proc_new(emu->card, "emu10k1x_regs", &entry)) { | 1070 | snd_emu10k1x_proc_reg_write); |
1071 | snd_info_set_text_ops(entry, emu, snd_emu10k1x_proc_reg_read); | ||
1072 | entry->c.text.write = snd_emu10k1x_proc_reg_write; | ||
1073 | entry->mode |= 0200; | ||
1074 | entry->private_data = emu; | ||
1075 | } | ||
1076 | |||
1077 | return 0; | 1071 | return 0; |
1078 | } | 1072 | } |
1079 | 1073 | ||
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index b57008031792..a3d9f06e8e6a 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c | |||
@@ -568,55 +568,40 @@ int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) | |||
568 | struct snd_info_entry *entry; | 568 | struct snd_info_entry *entry; |
569 | #ifdef CONFIG_SND_DEBUG | 569 | #ifdef CONFIG_SND_DEBUG |
570 | if (emu->card_capabilities->emu_model) { | 570 | if (emu->card_capabilities->emu_model) { |
571 | if (! snd_card_proc_new(emu->card, "emu1010_regs", &entry)) | 571 | snd_card_ro_proc_new(emu->card, "emu1010_regs", |
572 | snd_info_set_text_ops(entry, emu, snd_emu_proc_emu1010_reg_read); | 572 | emu, snd_emu_proc_emu1010_reg_read); |
573 | } | ||
574 | if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { | ||
575 | snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); | ||
576 | entry->c.text.write = snd_emu_proc_io_reg_write; | ||
577 | entry->mode |= 0200; | ||
578 | } | ||
579 | if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) { | ||
580 | snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a); | ||
581 | entry->c.text.write = snd_emu_proc_ptr_reg_write00; | ||
582 | entry->mode |= 0200; | ||
583 | } | ||
584 | if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) { | ||
585 | snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b); | ||
586 | entry->c.text.write = snd_emu_proc_ptr_reg_write00; | ||
587 | entry->mode |= 0200; | ||
588 | } | ||
589 | if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) { | ||
590 | snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a); | ||
591 | entry->c.text.write = snd_emu_proc_ptr_reg_write20; | ||
592 | entry->mode |= 0200; | ||
593 | } | ||
594 | if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) { | ||
595 | snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b); | ||
596 | entry->c.text.write = snd_emu_proc_ptr_reg_write20; | ||
597 | entry->mode |= 0200; | ||
598 | } | ||
599 | if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { | ||
600 | snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c); | ||
601 | entry->c.text.write = snd_emu_proc_ptr_reg_write20; | ||
602 | entry->mode |= 0200; | ||
603 | } | 573 | } |
574 | snd_card_rw_proc_new(emu->card, "io_regs", emu, | ||
575 | snd_emu_proc_io_reg_read, | ||
576 | snd_emu_proc_io_reg_write); | ||
577 | snd_card_rw_proc_new(emu->card, "ptr_regs00a", emu, | ||
578 | snd_emu_proc_ptr_reg_read00a, | ||
579 | snd_emu_proc_ptr_reg_write00); | ||
580 | snd_card_rw_proc_new(emu->card, "ptr_regs00b", emu, | ||
581 | snd_emu_proc_ptr_reg_read00b, | ||
582 | snd_emu_proc_ptr_reg_write00); | ||
583 | snd_card_rw_proc_new(emu->card, "ptr_regs20a", emu, | ||
584 | snd_emu_proc_ptr_reg_read20a, | ||
585 | snd_emu_proc_ptr_reg_write20); | ||
586 | snd_card_rw_proc_new(emu->card, "ptr_regs20b", emu, | ||
587 | snd_emu_proc_ptr_reg_read20b, | ||
588 | snd_emu_proc_ptr_reg_write20); | ||
589 | snd_card_rw_proc_new(emu->card, "ptr_regs20c", emu, | ||
590 | snd_emu_proc_ptr_reg_read20c, | ||
591 | snd_emu_proc_ptr_reg_write20); | ||
604 | #endif | 592 | #endif |
605 | 593 | ||
606 | if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) | 594 | snd_card_ro_proc_new(emu->card, "emu10k1", emu, snd_emu10k1_proc_read); |
607 | snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_read); | ||
608 | 595 | ||
609 | if (emu->card_capabilities->emu10k2_chip) { | 596 | if (emu->card_capabilities->emu10k2_chip) |
610 | if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) | 597 | snd_card_ro_proc_new(emu->card, "spdif-in", emu, |
611 | snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_spdif_read); | 598 | snd_emu10k1_proc_spdif_read); |
612 | } | 599 | if (emu->card_capabilities->ca0151_chip) |
613 | if (emu->card_capabilities->ca0151_chip) { | 600 | snd_card_ro_proc_new(emu->card, "capture-rates", emu, |
614 | if (! snd_card_proc_new(emu->card, "capture-rates", &entry)) | 601 | snd_emu10k1_proc_rates_read); |
615 | snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_rates_read); | ||
616 | } | ||
617 | 602 | ||
618 | if (! snd_card_proc_new(emu->card, "voices", &entry)) | 603 | snd_card_ro_proc_new(emu->card, "voices", emu, |
619 | snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_voices_read); | 604 | snd_emu10k1_proc_voices_read); |
620 | 605 | ||
621 | if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { | 606 | if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { |
622 | entry->content = SNDRV_INFO_CONTENT_DATA; | 607 | entry->content = SNDRV_INFO_CONTENT_DATA; |
@@ -646,11 +631,7 @@ int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) | |||
646 | entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; | 631 | entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; |
647 | entry->c.ops = &snd_emu10k1_proc_ops_fx8010; | 632 | entry->c.ops = &snd_emu10k1_proc_ops_fx8010; |
648 | } | 633 | } |
649 | if (! snd_card_proc_new(emu->card, "fx8010_acode", &entry)) { | 634 | snd_card_ro_proc_new(emu->card, "fx8010_acode", emu, |
650 | entry->content = SNDRV_INFO_CONTENT_TEXT; | 635 | snd_emu10k1_proc_acode_read); |
651 | entry->private_data = emu; | ||
652 | entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; | ||
653 | entry->c.text.read = snd_emu10k1_proc_acode_read; | ||
654 | } | ||
655 | return 0; | 636 | return 0; |
656 | } | 637 | } |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 1f2960ecc57e..1cfff35e370e 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -1902,10 +1902,8 @@ static void snd_ensoniq_proc_read(struct snd_info_entry *entry, | |||
1902 | 1902 | ||
1903 | static void snd_ensoniq_proc_init(struct ensoniq *ensoniq) | 1903 | static void snd_ensoniq_proc_init(struct ensoniq *ensoniq) |
1904 | { | 1904 | { |
1905 | struct snd_info_entry *entry; | 1905 | snd_card_ro_proc_new(ensoniq->card, "audiopci", ensoniq, |
1906 | 1906 | snd_ensoniq_proc_read); | |
1907 | if (! snd_card_proc_new(ensoniq->card, "audiopci", &entry)) | ||
1908 | snd_info_set_text_ops(entry, ensoniq, snd_ensoniq_proc_read); | ||
1909 | } | 1907 | } |
1910 | 1908 | ||
1911 | /* | 1909 | /* |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index a65740419650..853842987fa1 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -919,15 +919,8 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
919 | int snd_hda_codec_proc_new(struct hda_codec *codec) | 919 | int snd_hda_codec_proc_new(struct hda_codec *codec) |
920 | { | 920 | { |
921 | char name[32]; | 921 | char name[32]; |
922 | struct snd_info_entry *entry; | ||
923 | int err; | ||
924 | 922 | ||
925 | snprintf(name, sizeof(name), "codec#%d", codec->core.addr); | 923 | snprintf(name, sizeof(name), "codec#%d", codec->core.addr); |
926 | err = snd_card_proc_new(codec->card, name, &entry); | 924 | return snd_card_ro_proc_new(codec->card, name, codec, print_codec_info); |
927 | if (err < 0) | ||
928 | return err; | ||
929 | |||
930 | snd_info_set_text_ops(entry, codec, print_codec_info); | ||
931 | return 0; | ||
932 | } | 925 | } |
933 | 926 | ||
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index dda9b26192cb..fa7d90ee6e2d 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -1603,10 +1603,7 @@ static void snd_ice1712_proc_read(struct snd_info_entry *entry, | |||
1603 | 1603 | ||
1604 | static void snd_ice1712_proc_init(struct snd_ice1712 *ice) | 1604 | static void snd_ice1712_proc_init(struct snd_ice1712 *ice) |
1605 | { | 1605 | { |
1606 | struct snd_info_entry *entry; | 1606 | snd_card_ro_proc_new(ice->card, "ice1712", ice, snd_ice1712_proc_read); |
1607 | |||
1608 | if (!snd_card_proc_new(ice->card, "ice1712", &entry)) | ||
1609 | snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read); | ||
1610 | } | 1607 | } |
1611 | 1608 | ||
1612 | /* | 1609 | /* |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 42994cf36156..a7d640ee4a17 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -1571,10 +1571,7 @@ static void snd_vt1724_proc_read(struct snd_info_entry *entry, | |||
1571 | 1571 | ||
1572 | static void snd_vt1724_proc_init(struct snd_ice1712 *ice) | 1572 | static void snd_vt1724_proc_init(struct snd_ice1712 *ice) |
1573 | { | 1573 | { |
1574 | struct snd_info_entry *entry; | 1574 | snd_card_ro_proc_new(ice->card, "ice1724", ice, snd_vt1724_proc_read); |
1575 | |||
1576 | if (!snd_card_proc_new(ice->card, "ice1724", &entry)) | ||
1577 | snd_info_set_text_ops(entry, ice, snd_vt1724_proc_read); | ||
1578 | } | 1575 | } |
1579 | 1576 | ||
1580 | /* | 1577 | /* |
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c index 93b8cfc6636f..f499f1e8d0c9 100644 --- a/sound/pci/ice1712/pontis.c +++ b/sound/pci/ice1712/pontis.c | |||
@@ -659,12 +659,8 @@ static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buff | |||
659 | 659 | ||
660 | static void wm_proc_init(struct snd_ice1712 *ice) | 660 | static void wm_proc_init(struct snd_ice1712 *ice) |
661 | { | 661 | { |
662 | struct snd_info_entry *entry; | 662 | snd_card_rw_proc_new(ice->card, "wm_codec", ice, wm_proc_regs_read, |
663 | if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) { | 663 | wm_proc_regs_write); |
664 | snd_info_set_text_ops(entry, ice, wm_proc_regs_read); | ||
665 | entry->mode |= 0200; | ||
666 | entry->c.text.write = wm_proc_regs_write; | ||
667 | } | ||
668 | } | 664 | } |
669 | 665 | ||
670 | static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) | 666 | static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) |
@@ -684,9 +680,7 @@ static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buff | |||
684 | 680 | ||
685 | static void cs_proc_init(struct snd_ice1712 *ice) | 681 | static void cs_proc_init(struct snd_ice1712 *ice) |
686 | { | 682 | { |
687 | struct snd_info_entry *entry; | 683 | snd_card_ro_proc_new(ice->card, "cs_codec", ice, cs_proc_regs_read); |
688 | if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) | ||
689 | snd_info_set_text_ops(entry, ice, cs_proc_regs_read); | ||
690 | } | 684 | } |
691 | 685 | ||
692 | 686 | ||
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c index 3919aed39ca0..d243309029d3 100644 --- a/sound/pci/ice1712/prodigy192.c +++ b/sound/pci/ice1712/prodigy192.c | |||
@@ -651,9 +651,8 @@ static void stac9460_proc_regs_read(struct snd_info_entry *entry, | |||
651 | 651 | ||
652 | static void stac9460_proc_init(struct snd_ice1712 *ice) | 652 | static void stac9460_proc_init(struct snd_ice1712 *ice) |
653 | { | 653 | { |
654 | struct snd_info_entry *entry; | 654 | snd_card_ro_proc_new(ice->card, "stac9460_codec", ice, |
655 | if (!snd_card_proc_new(ice->card, "stac9460_codec", &entry)) | 655 | stac9460_proc_regs_read); |
656 | snd_info_set_text_ops(entry, ice, stac9460_proc_regs_read); | ||
657 | } | 656 | } |
658 | 657 | ||
659 | 658 | ||
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index c97b5528e4b8..72f252c936e5 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c | |||
@@ -904,12 +904,8 @@ static void wm_proc_regs_read(struct snd_info_entry *entry, | |||
904 | 904 | ||
905 | static void wm_proc_init(struct snd_ice1712 *ice) | 905 | static void wm_proc_init(struct snd_ice1712 *ice) |
906 | { | 906 | { |
907 | struct snd_info_entry *entry; | 907 | snd_card_rw_proc_new(ice->card, "wm_codec", ice, wm_proc_regs_read, |
908 | if (!snd_card_proc_new(ice->card, "wm_codec", &entry)) { | 908 | wm_proc_regs_write); |
909 | snd_info_set_text_ops(entry, ice, wm_proc_regs_read); | ||
910 | entry->mode |= 0200; | ||
911 | entry->c.text.write = wm_proc_regs_write; | ||
912 | } | ||
913 | } | 909 | } |
914 | 910 | ||
915 | static int prodigy_hifi_add_controls(struct snd_ice1712 *ice) | 911 | static int prodigy_hifi_add_controls(struct snd_ice1712 *ice) |
diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c index 5bc836241c97..8ad964ee0b65 100644 --- a/sound/pci/ice1712/quartet.c +++ b/sound/pci/ice1712/quartet.c | |||
@@ -502,9 +502,7 @@ static void proc_regs_read(struct snd_info_entry *entry, | |||
502 | 502 | ||
503 | static void proc_init(struct snd_ice1712 *ice) | 503 | static void proc_init(struct snd_ice1712 *ice) |
504 | { | 504 | { |
505 | struct snd_info_entry *entry; | 505 | snd_card_ro_proc_new(ice->card, "quartet", ice, proc_regs_read); |
506 | if (!snd_card_proc_new(ice->card, "quartet", &entry)) | ||
507 | snd_info_set_text_ops(entry, ice, proc_regs_read); | ||
508 | } | 506 | } |
509 | 507 | ||
510 | static int qtet_mute_get(struct snd_kcontrol *kcontrol, | 508 | static int qtet_mute_get(struct snd_kcontrol *kcontrol, |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 885e1d488ed6..2784bf48cf5a 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2863,10 +2863,8 @@ static void snd_intel8x0_proc_read(struct snd_info_entry * entry, | |||
2863 | 2863 | ||
2864 | static void snd_intel8x0_proc_init(struct intel8x0 *chip) | 2864 | static void snd_intel8x0_proc_init(struct intel8x0 *chip) |
2865 | { | 2865 | { |
2866 | struct snd_info_entry *entry; | 2866 | snd_card_ro_proc_new(chip->card, "intel8x0", chip, |
2867 | 2867 | snd_intel8x0_proc_read); | |
2868 | if (! snd_card_proc_new(chip->card, "intel8x0", &entry)) | ||
2869 | snd_info_set_text_ops(entry, chip, snd_intel8x0_proc_read); | ||
2870 | } | 2868 | } |
2871 | 2869 | ||
2872 | static int snd_intel8x0_dev_free(struct snd_device *device) | 2870 | static int snd_intel8x0_dev_free(struct snd_device *device) |
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 44eb9e28a1eb..43c654e15452 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -1084,10 +1084,8 @@ static void snd_intel8x0m_proc_read(struct snd_info_entry * entry, | |||
1084 | 1084 | ||
1085 | static void snd_intel8x0m_proc_init(struct intel8x0m *chip) | 1085 | static void snd_intel8x0m_proc_init(struct intel8x0m *chip) |
1086 | { | 1086 | { |
1087 | struct snd_info_entry *entry; | 1087 | snd_card_ro_proc_new(chip->card, "intel8x0m", chip, |
1088 | 1088 | snd_intel8x0m_proc_read); | |
1089 | if (! snd_card_proc_new(chip->card, "intel8x0m", &entry)) | ||
1090 | snd_info_set_text_ops(entry, chip, snd_intel8x0m_proc_read); | ||
1091 | } | 1089 | } |
1092 | 1090 | ||
1093 | static int snd_intel8x0m_dev_free(struct snd_device *device) | 1091 | static int snd_intel8x0m_dev_free(struct snd_device *device) |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 4e189a93f475..fe4aba8a08ea 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -2090,10 +2090,8 @@ static void snd_korg1212_proc_read(struct snd_info_entry *entry, | |||
2090 | 2090 | ||
2091 | static void snd_korg1212_proc_init(struct snd_korg1212 *korg1212) | 2091 | static void snd_korg1212_proc_init(struct snd_korg1212 *korg1212) |
2092 | { | 2092 | { |
2093 | struct snd_info_entry *entry; | 2093 | snd_card_ro_proc_new(korg1212->card, "korg1212", korg1212, |
2094 | 2094 | snd_korg1212_proc_read); | |
2095 | if (! snd_card_proc_new(korg1212->card, "korg1212", &entry)) | ||
2096 | snd_info_set_text_ops(entry, korg1212, snd_korg1212_proc_read); | ||
2097 | } | 2095 | } |
2098 | 2096 | ||
2099 | static int | 2097 | static int |
diff --git a/sound/pci/lola/lola_proc.c b/sound/pci/lola/lola_proc.c index 904e3c4f4dfe..1603f9c81897 100644 --- a/sound/pci/lola/lola_proc.c +++ b/sound/pci/lola/lola_proc.c | |||
@@ -208,15 +208,9 @@ static void lola_proc_regs_read(struct snd_info_entry *entry, | |||
208 | 208 | ||
209 | void lola_proc_debug_new(struct lola *chip) | 209 | void lola_proc_debug_new(struct lola *chip) |
210 | { | 210 | { |
211 | struct snd_info_entry *entry; | 211 | snd_card_ro_proc_new(chip->card, "codec", chip, lola_proc_codec_read); |
212 | 212 | snd_card_rw_proc_new(chip->card, "codec_rw", chip, | |
213 | if (!snd_card_proc_new(chip->card, "codec", &entry)) | 213 | lola_proc_codec_rw_read, |
214 | snd_info_set_text_ops(entry, chip, lola_proc_codec_read); | 214 | lola_proc_codec_rw_write); |
215 | if (!snd_card_proc_new(chip->card, "codec_rw", &entry)) { | 215 | snd_card_ro_proc_new(chip->card, "regs", chip, lola_proc_regs_read); |
216 | snd_info_set_text_ops(entry, chip, lola_proc_codec_rw_read); | ||
217 | entry->mode |= 0200; | ||
218 | entry->c.text.write = lola_proc_codec_rw_write; | ||
219 | } | ||
220 | if (!snd_card_proc_new(chip->card, "regs", &entry)) | ||
221 | snd_info_set_text_ops(entry, chip, lola_proc_regs_read); | ||
222 | } | 216 | } |
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index 54f6252faca6..198ccf9b5eb3 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
@@ -948,13 +948,7 @@ static void lx_proc_levels_read(struct snd_info_entry *entry, | |||
948 | 948 | ||
949 | static int lx_proc_create(struct snd_card *card, struct lx6464es *chip) | 949 | static int lx_proc_create(struct snd_card *card, struct lx6464es *chip) |
950 | { | 950 | { |
951 | struct snd_info_entry *entry; | 951 | return snd_card_ro_proc_new(card, "levels", chip, lx_proc_levels_read); |
952 | int err = snd_card_proc_new(card, "levels", &entry); | ||
953 | if (err < 0) | ||
954 | return err; | ||
955 | |||
956 | snd_info_set_text_ops(entry, chip, lx_proc_levels_read); | ||
957 | return 0; | ||
958 | } | 952 | } |
959 | 953 | ||
960 | 954 | ||
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 9cd297a42f24..92f616df3863 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -1220,10 +1220,8 @@ static void snd_mixart_proc_init(struct snd_mixart *chip) | |||
1220 | struct snd_info_entry *entry; | 1220 | struct snd_info_entry *entry; |
1221 | 1221 | ||
1222 | /* text interface to read perf and temp meters */ | 1222 | /* text interface to read perf and temp meters */ |
1223 | if (! snd_card_proc_new(chip->card, "board_info", &entry)) { | 1223 | snd_card_ro_proc_new(chip->card, "board_info", chip, |
1224 | entry->private_data = chip; | 1224 | snd_mixart_proc_read); |
1225 | entry->c.text.read = snd_mixart_proc_read; | ||
1226 | } | ||
1227 | 1225 | ||
1228 | if (! snd_card_proc_new(chip->card, "mixart_BA0", &entry)) { | 1226 | if (! snd_card_proc_new(chip->card, "mixart_BA0", &entry)) { |
1229 | entry->content = SNDRV_INFO_CONTENT_DATA; | 1227 | entry->content = SNDRV_INFO_CONTENT_DATA; |
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index d4cfff7e49e1..3ae9dd4b39e8 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -244,10 +244,7 @@ static void oxygen_proc_read(struct snd_info_entry *entry, | |||
244 | 244 | ||
245 | static void oxygen_proc_init(struct oxygen *chip) | 245 | static void oxygen_proc_init(struct oxygen *chip) |
246 | { | 246 | { |
247 | struct snd_info_entry *entry; | 247 | snd_card_ro_proc_new(chip->card, "oxygen", chip, oxygen_proc_read); |
248 | |||
249 | if (!snd_card_proc_new(chip->card, "oxygen", &entry)) | ||
250 | snd_info_set_text_ops(entry, chip, oxygen_proc_read); | ||
251 | } | 248 | } |
252 | 249 | ||
253 | static const struct pci_device_id * | 250 | static const struct pci_device_id * |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index e57da4036231..4ab7efc6e9f7 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -1454,21 +1454,14 @@ static void pcxhr_proc_ltc(struct snd_info_entry *entry, | |||
1454 | 1454 | ||
1455 | static void pcxhr_proc_init(struct snd_pcxhr *chip) | 1455 | static void pcxhr_proc_init(struct snd_pcxhr *chip) |
1456 | { | 1456 | { |
1457 | struct snd_info_entry *entry; | 1457 | snd_card_ro_proc_new(chip->card, "info", chip, pcxhr_proc_info); |
1458 | 1458 | snd_card_ro_proc_new(chip->card, "sync", chip, pcxhr_proc_sync); | |
1459 | if (! snd_card_proc_new(chip->card, "info", &entry)) | ||
1460 | snd_info_set_text_ops(entry, chip, pcxhr_proc_info); | ||
1461 | if (! snd_card_proc_new(chip->card, "sync", &entry)) | ||
1462 | snd_info_set_text_ops(entry, chip, pcxhr_proc_sync); | ||
1463 | /* gpio available on stereo sound cards only */ | 1459 | /* gpio available on stereo sound cards only */ |
1464 | if (chip->mgr->is_hr_stereo && | 1460 | if (chip->mgr->is_hr_stereo) |
1465 | !snd_card_proc_new(chip->card, "gpio", &entry)) { | 1461 | snd_card_rw_proc_new(chip->card, "gpio", chip, |
1466 | snd_info_set_text_ops(entry, chip, pcxhr_proc_gpio_read); | 1462 | pcxhr_proc_gpio_read, |
1467 | entry->c.text.write = pcxhr_proc_gpo_write; | 1463 | pcxhr_proc_gpo_write); |
1468 | entry->mode |= 0200; | 1464 | snd_card_ro_proc_new(chip->card, "ltc", chip, pcxhr_proc_ltc); |
1469 | } | ||
1470 | if (!snd_card_proc_new(chip->card, "ltc", &entry)) | ||
1471 | snd_info_set_text_ops(entry, chip, pcxhr_proc_ltc); | ||
1472 | } | 1465 | } |
1473 | /* end of proc interface */ | 1466 | /* end of proc interface */ |
1474 | 1467 | ||
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 1d431c8052d6..8d1a56a9bcfd 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -1973,10 +1973,8 @@ snd_riptide_proc_read(struct snd_info_entry *entry, | |||
1973 | 1973 | ||
1974 | static void snd_riptide_proc_init(struct snd_riptide *chip) | 1974 | static void snd_riptide_proc_init(struct snd_riptide *chip) |
1975 | { | 1975 | { |
1976 | struct snd_info_entry *entry; | 1976 | snd_card_ro_proc_new(chip->card, "riptide", chip, |
1977 | 1977 | snd_riptide_proc_read); | |
1978 | if (!snd_card_proc_new(chip->card, "riptide", &entry)) | ||
1979 | snd_info_set_text_ops(entry, chip, snd_riptide_proc_read); | ||
1980 | } | 1978 | } |
1981 | 1979 | ||
1982 | static int snd_riptide_mixer(struct snd_riptide *chip) | 1980 | static int snd_riptide_mixer(struct snd_riptide *chip) |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 3ac8c71d567c..c6bcc0715716 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -1568,10 +1568,7 @@ snd_rme32_proc_read(struct snd_info_entry * entry, struct snd_info_buffer *buffe | |||
1568 | 1568 | ||
1569 | static void snd_rme32_proc_init(struct rme32 *rme32) | 1569 | static void snd_rme32_proc_init(struct rme32 *rme32) |
1570 | { | 1570 | { |
1571 | struct snd_info_entry *entry; | 1571 | snd_card_ro_proc_new(rme32->card, "rme32", rme32, snd_rme32_proc_read); |
1572 | |||
1573 | if (! snd_card_proc_new(rme32->card, "rme32", &entry)) | ||
1574 | snd_info_set_text_ops(entry, rme32, snd_rme32_proc_read); | ||
1575 | } | 1572 | } |
1576 | 1573 | ||
1577 | /* | 1574 | /* |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index c56702e6cb60..42c6b5e09072 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -1868,10 +1868,7 @@ snd_rme96_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer | |||
1868 | 1868 | ||
1869 | static void snd_rme96_proc_init(struct rme96 *rme96) | 1869 | static void snd_rme96_proc_init(struct rme96 *rme96) |
1870 | { | 1870 | { |
1871 | struct snd_info_entry *entry; | 1871 | snd_card_ro_proc_new(rme96->card, "rme96", rme96, snd_rme96_proc_read); |
1872 | |||
1873 | if (! snd_card_proc_new(rme96->card, "rme96", &entry)) | ||
1874 | snd_info_set_text_ops(entry, rme96, snd_rme96_proc_read); | ||
1875 | } | 1872 | } |
1876 | 1873 | ||
1877 | /* | 1874 | /* |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index ba99ff0e93e0..29bef48a3af3 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -3708,10 +3708,7 @@ snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) | |||
3708 | 3708 | ||
3709 | static void snd_hdsp_proc_init(struct hdsp *hdsp) | 3709 | static void snd_hdsp_proc_init(struct hdsp *hdsp) |
3710 | { | 3710 | { |
3711 | struct snd_info_entry *entry; | 3711 | snd_card_ro_proc_new(hdsp->card, "hdsp", hdsp, snd_hdsp_proc_read); |
3712 | |||
3713 | if (! snd_card_proc_new(hdsp->card, "hdsp", &entry)) | ||
3714 | snd_info_set_text_ops(entry, hdsp, snd_hdsp_proc_read); | ||
3715 | } | 3712 | } |
3716 | 3713 | ||
3717 | static void snd_hdsp_free_buffers(struct hdsp *hdsp) | 3714 | static void snd_hdsp_free_buffers(struct hdsp *hdsp) |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 679ad0415e3b..d485dd8a7b72 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -5287,44 +5287,35 @@ static void snd_hdspm_proc_ports_out(struct snd_info_entry *entry, | |||
5287 | 5287 | ||
5288 | static void snd_hdspm_proc_init(struct hdspm *hdspm) | 5288 | static void snd_hdspm_proc_init(struct hdspm *hdspm) |
5289 | { | 5289 | { |
5290 | struct snd_info_entry *entry; | 5290 | void (*read)(struct snd_info_entry *, struct snd_info_buffer *) = NULL; |
5291 | 5291 | ||
5292 | if (!snd_card_proc_new(hdspm->card, "hdspm", &entry)) { | 5292 | switch (hdspm->io_type) { |
5293 | switch (hdspm->io_type) { | 5293 | case AES32: |
5294 | case AES32: | 5294 | read = snd_hdspm_proc_read_aes32; |
5295 | snd_info_set_text_ops(entry, hdspm, | 5295 | break; |
5296 | snd_hdspm_proc_read_aes32); | 5296 | case MADI: |
5297 | break; | 5297 | read = snd_hdspm_proc_read_madi; |
5298 | case MADI: | 5298 | break; |
5299 | snd_info_set_text_ops(entry, hdspm, | 5299 | case MADIface: |
5300 | snd_hdspm_proc_read_madi); | 5300 | /* read = snd_hdspm_proc_read_madiface; */ |
5301 | break; | 5301 | break; |
5302 | case MADIface: | 5302 | case RayDAT: |
5303 | /* snd_info_set_text_ops(entry, hdspm, | 5303 | read = snd_hdspm_proc_read_raydat; |
5304 | snd_hdspm_proc_read_madiface); */ | 5304 | break; |
5305 | break; | 5305 | case AIO: |
5306 | case RayDAT: | 5306 | break; |
5307 | snd_info_set_text_ops(entry, hdspm, | ||
5308 | snd_hdspm_proc_read_raydat); | ||
5309 | break; | ||
5310 | case AIO: | ||
5311 | break; | ||
5312 | } | ||
5313 | } | ||
5314 | |||
5315 | if (!snd_card_proc_new(hdspm->card, "ports.in", &entry)) { | ||
5316 | snd_info_set_text_ops(entry, hdspm, snd_hdspm_proc_ports_in); | ||
5317 | } | 5307 | } |
5318 | 5308 | ||
5319 | if (!snd_card_proc_new(hdspm->card, "ports.out", &entry)) { | 5309 | snd_card_ro_proc_new(hdspm->card, "hdspm", hdspm, read); |
5320 | snd_info_set_text_ops(entry, hdspm, snd_hdspm_proc_ports_out); | 5310 | snd_card_ro_proc_new(hdspm->card, "ports.in", hdspm, |
5321 | } | 5311 | snd_hdspm_proc_ports_in); |
5312 | snd_card_ro_proc_new(hdspm->card, "ports.out", hdspm, | ||
5313 | snd_hdspm_proc_ports_out); | ||
5322 | 5314 | ||
5323 | #ifdef CONFIG_SND_DEBUG | 5315 | #ifdef CONFIG_SND_DEBUG |
5324 | /* debug file to read all hdspm registers */ | 5316 | /* debug file to read all hdspm registers */ |
5325 | if (!snd_card_proc_new(hdspm->card, "debug", &entry)) | 5317 | snd_card_ro_proc_new(hdspm->card, "debug", hdspm, |
5326 | snd_info_set_text_ops(entry, hdspm, | 5318 | snd_hdspm_proc_read_debug); |
5327 | snd_hdspm_proc_read_debug); | ||
5328 | #endif | 5319 | #endif |
5329 | } | 5320 | } |
5330 | 5321 | ||
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index edd765e22377..5228b982da5a 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -1737,10 +1737,8 @@ snd_rme9652_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buff | |||
1737 | 1737 | ||
1738 | static void snd_rme9652_proc_init(struct snd_rme9652 *rme9652) | 1738 | static void snd_rme9652_proc_init(struct snd_rme9652 *rme9652) |
1739 | { | 1739 | { |
1740 | struct snd_info_entry *entry; | 1740 | snd_card_ro_proc_new(rme9652->card, "rme9652", rme9652, |
1741 | 1741 | snd_rme9652_proc_read); | |
1742 | if (! snd_card_proc_new(rme9652->card, "rme9652", &entry)) | ||
1743 | snd_info_set_text_ops(entry, rme9652, snd_rme9652_proc_read); | ||
1744 | } | 1742 | } |
1745 | 1743 | ||
1746 | static void snd_rme9652_free_buffers(struct snd_rme9652 *rme9652) | 1744 | static void snd_rme9652_free_buffers(struct snd_rme9652 *rme9652) |
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 7218f38b59db..71d5ad3cffd6 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -1171,10 +1171,8 @@ static void snd_sonicvibes_proc_read(struct snd_info_entry *entry, | |||
1171 | 1171 | ||
1172 | static void snd_sonicvibes_proc_init(struct sonicvibes *sonic) | 1172 | static void snd_sonicvibes_proc_init(struct sonicvibes *sonic) |
1173 | { | 1173 | { |
1174 | struct snd_info_entry *entry; | 1174 | snd_card_ro_proc_new(sonic->card, "sonicvibes", sonic, |
1175 | 1175 | snd_sonicvibes_proc_read); | |
1176 | if (! snd_card_proc_new(sonic->card, "sonicvibes", &entry)) | ||
1177 | snd_info_set_text_ops(entry, sonic, snd_sonicvibes_proc_read); | ||
1178 | } | 1176 | } |
1179 | 1177 | ||
1180 | /* | 1178 | /* |
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index f271ea436cff..0ff32d3f5d3b 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -3320,13 +3320,11 @@ static void snd_trident_proc_read(struct snd_info_entry *entry, | |||
3320 | 3320 | ||
3321 | static void snd_trident_proc_init(struct snd_trident *trident) | 3321 | static void snd_trident_proc_init(struct snd_trident *trident) |
3322 | { | 3322 | { |
3323 | struct snd_info_entry *entry; | ||
3324 | const char *s = "trident"; | 3323 | const char *s = "trident"; |
3325 | 3324 | ||
3326 | if (trident->device == TRIDENT_DEVICE_ID_SI7018) | 3325 | if (trident->device == TRIDENT_DEVICE_ID_SI7018) |
3327 | s = "sis7018"; | 3326 | s = "sis7018"; |
3328 | if (! snd_card_proc_new(trident->card, s, &entry)) | 3327 | snd_card_ro_proc_new(trident->card, s, trident, snd_trident_proc_read); |
3329 | snd_info_set_text_ops(entry, trident, snd_trident_proc_read); | ||
3330 | } | 3328 | } |
3331 | 3329 | ||
3332 | static int snd_trident_dev_free(struct snd_device *device) | 3330 | static int snd_trident_dev_free(struct snd_device *device) |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 736ac79901b3..dee1c487d6ba 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -2144,10 +2144,8 @@ static void snd_via82xx_proc_read(struct snd_info_entry *entry, | |||
2144 | 2144 | ||
2145 | static void snd_via82xx_proc_init(struct via82xx *chip) | 2145 | static void snd_via82xx_proc_init(struct via82xx *chip) |
2146 | { | 2146 | { |
2147 | struct snd_info_entry *entry; | 2147 | snd_card_ro_proc_new(chip->card, "via82xx", chip, |
2148 | 2148 | snd_via82xx_proc_read); | |
2149 | if (! snd_card_proc_new(chip->card, "via82xx", &entry)) | ||
2150 | snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read); | ||
2151 | } | 2149 | } |
2152 | 2150 | ||
2153 | /* | 2151 | /* |
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index 3f59e0279058..848bf9dbf8cd 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -937,10 +937,8 @@ static void snd_via82xx_proc_read(struct snd_info_entry *entry, struct snd_info_ | |||
937 | 937 | ||
938 | static void snd_via82xx_proc_init(struct via82xx_modem *chip) | 938 | static void snd_via82xx_proc_init(struct via82xx_modem *chip) |
939 | { | 939 | { |
940 | struct snd_info_entry *entry; | 940 | snd_card_ro_proc_new(chip->card, "via82xx", chip, |
941 | 941 | snd_via82xx_proc_read); | |
942 | if (! snd_card_proc_new(chip->card, "via82xx", &entry)) | ||
943 | snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read); | ||
944 | } | 942 | } |
945 | 943 | ||
946 | /* | 944 | /* |
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index c688b7f481da..4d48877f211f 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -1985,11 +1985,7 @@ static void snd_ymfpci_proc_read(struct snd_info_entry *entry, | |||
1985 | 1985 | ||
1986 | static int snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfpci *chip) | 1986 | static int snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfpci *chip) |
1987 | { | 1987 | { |
1988 | struct snd_info_entry *entry; | 1988 | return snd_card_ro_proc_new(card, "ymfpci", chip, snd_ymfpci_proc_read); |
1989 | |||
1990 | if (! snd_card_proc_new(card, "ymfpci", &entry)) | ||
1991 | snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read); | ||
1992 | return 0; | ||
1993 | } | 1989 | } |
1994 | 1990 | ||
1995 | /* | 1991 | /* |