Update of /cvsroot/alsa/alsa-kernel/pci/ice1712
In directory sc8-pr-cvs1:/tmp/cvs-serv6295/pci/ice1712

Modified Files:
        ice1712.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: ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ice1712.c   7 Jan 2003 09:12:21 -0000       1.15
+++ ice1712.c   7 Jan 2003 10:36:31 -0000       1.16
@@ -1693,26 +1693,8 @@
 {
        snd_info_entry_t *entry;
 
-       if ((entry = snd_info_create_card_entry(ice->card, "ice1712", 
ice->card->proc_root)) != NULL) {
-               entry->content = SNDRV_INFO_CONTENT_TEXT;
-               entry->private_data = ice;
-               entry->mode = S_IFREG | S_IRUGO | S_IWUSR;
-               entry->c.text.read_size = 2048;
-               entry->c.text.read = snd_ice1712_proc_read;
-               if (snd_info_register(entry) < 0) {
-                       snd_info_free_entry(entry);
-                       entry = NULL;
-               }
-       }
-       ice->proc_entry = entry;
-}
-
-static void snd_ice1712_proc_done(ice1712_t * ice)
-{
-       if (ice->proc_entry) {
-               snd_info_unregister(ice->proc_entry);
-               ice->proc_entry = NULL;
-       }
+       if (! snd_card_proc_new(ice->card, "ice1712", &entry))
+               snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read);
 }
 
 /*
@@ -2688,7 +2670,6 @@
        outb(0xff, ICEREG(ice, IRQMASK));
        /* --- */
       __hw_end:
-       snd_ice1712_proc_done(ice);
        if (ice->irq >= 0) {
                synchronize_irq(ice->irq);
                free_irq(ice->irq, (void *) ice);



-------------------------------------------------------
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

Reply via email to