Update of /cvsroot/alsa/alsa-kernel/pci/ymfpci
In directory sc8-pr-cvs1:/tmp/cvs-serv6295/pci/ymfpci
Modified Files:
ymfpci_main.c
Log Message:
[PATCH: proc-card-dev.dif]
- added snd_card_proc_new() to create a normal text proc file for
the card basis. it's handled as an ALSA device, so no explicit
destruction is necessary.
- snd_info_set_text_ops() to set the callback function for convenience.
- applied the new function to each source and clean-up.
Index: ymfpci_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ymfpci/ymfpci_main.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ymfpci_main.c 7 Jan 2003 10:25:28 -0000 1.27
+++ ymfpci_main.c 7 Jan 2003 10:36:32 -0000 1.28
@@ -1827,26 +1827,8 @@
{
snd_info_entry_t *entry;
- entry = snd_info_create_card_entry(card, "ymfpci", card->proc_root);
- if (entry) {
- entry->content = SNDRV_INFO_CONTENT_TEXT;
- entry->private_data = chip;
- entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
- entry->c.text.read_size = 4096;
- entry->c.text.read = snd_ymfpci_proc_read;
- if (snd_info_register(entry) < 0) {
- snd_info_unregister(entry);
- entry = NULL;
- }
- }
- chip->proc_entry = entry;
- return 0;
-}
-
-static int snd_ymfpci_proc_done(ymfpci_t *chip)
-{
- if (chip->proc_entry)
- snd_info_unregister((snd_info_entry_t *) chip->proc_entry);
+ if (! snd_card_proc_new(card, "ymfpci", &entry))
+ snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read);
return 0;
}
@@ -2037,7 +2019,6 @@
u16 ctrl;
snd_assert(chip != NULL, return -EINVAL);
- snd_ymfpci_proc_done(chip);
if (chip->res_reg_area) { /* don't touch busy hardware */
snd_ymfpci_writel(chip, YDSXGR_NATIVEDACOUTVOL, 0);
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog