File: pcireg.patch

package info (click to toggle)
sl-modem 2.9.9d%2Be-pre2-7etch2
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 2,436 kB
  • ctags: 1,719
  • sloc: ansic: 10,780; sh: 548; makefile: 256; perl: 11
file content (24 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- amrmo_init.c_orig	2005-05-24 15:37:16.000000000 +0300
+++ amrmo_init.c	2005-05-24 15:39:03.000000000 +0300
@@ -58,9 +58,6 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 #define OLD_KERNEL 1
 #endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-#define pci_register_driver(drv) ( pci_register_driver(drv) ? 0 : -ENODEV )
-#endif
 
 #ifdef OLD_KERNEL
 #define iminor(i) MINOR((i)->i_rdev)
@@ -752,7 +749,11 @@
 		return err;
 	}
 #endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+	if (!pci_register_driver(&amrmo_pci_driver)) {
+#else
 	if ((err = pci_register_driver(&amrmo_pci_driver)) < 0) {
+#endif
 		pci_unregister_driver(&amrmo_pci_driver);
 #ifndef OLD_KERNEL
 		class_simple_destroy(amrmo_class);