[2.3.38] patch for trident 4D-Wave/SiS

From: Luca Montecchiani (m.luca@teamfab.it)
Date: Sat Jan 08 2000 - 14:58:15 EST


Hi,

I've just take some code from es1371.c to make trident.c
work also when compiled into the kernel.

ciao,
luca

--- trident.c.luca Sat Jan 8 19:34:07 2000
+++ trident.c Sat Jan 8 20:23:48 2000
@@ -29,6 +29,8 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  * History
+ * v0.05 Jan 08 2000 Luca Montecchiani <m.luca@iname.com>
+ * adapt to 2.3.x new __setup/__initcall
  * v0.04 Dec 31 1999 Ollie Lho
  * Multiple Open, useing Middle Loop Interrupt to smooth playback
  * v0.03 Dec 24 1999 Ollie Lho
@@ -68,7 +70,7 @@

 #undef DEBUG

-#define DRIVER_VERSION "0.03"
+#define DRIVER_VERSION "0.05"

 #define TRIDENT_FMT_STEREO 0x01
 #define TRIDENT_FMT_16BIT 0x02
@@ -2921,11 +2923,7 @@
        return 1;
 }

-#ifdef MODULE
-int init_module(void)
-#else
-int __init init_trident(void)
-#endif
+static int __init init_trident(void)
 {
        struct pci_dev *pcidev = NULL;
        int foundone = 0;
@@ -2951,7 +2949,6 @@
        return 0;
 }

-#ifdef MODULE
 MODULE_AUTHOR("Alan Cox <alan@redhat.com>");
 MODULE_DESCRIPTION("Trident 4DWave/SiS 7018 PCI Audio Driver");

@@ -2959,7 +2956,7 @@
 MODULE_PARM(debug,"i");
 #endif

-void cleanup_module(void)
+static void __exit cleanup_trident(void)
 {
        while (devs != NULL) {
                /* Kill interrupts, and SP/DIF */
@@ -2978,6 +2975,23 @@
                devs = devs->next;
        }
 }
-#endif /* MODULE */

+module_init(init_trident);
+module_exit(cleanup_trident);
+
+/* --------------------------------------------------------------------- */
+
+#ifndef MODULE
+
+static int __init trident_setup(char *str)
+{
+/*
+ Cmdline params, multiple cards,...
+ Who cares ?
+*/
+ return 1;
+}
+
+__setup("trident=", trident_setup);

+#endif /* MODULE */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:12 EST