Hello,

I had to upgrade my kernel today to 2.6.13 and noticed the fusion module failed to load because of missing symbols. After a quick google I found that some structs were renamed in kernel 2.6.13. I'm a bit tired atm but I just whipped up this small patch to make things work.

Thanks,
-Rob


--
-------------------------------------------------------
Rob Shortt        | http://tvcentric.com | Freevo
[EMAIL PROTECTED] | http://freevo.sf.net | Free your TV
Index: linux/drivers/char/fusion/fusiondev.c
===================================================================
RCS file: /cvs/directfb/linux-fusion/linux/drivers/char/fusion/fusiondev.c,v
retrieving revision 1.39
diff -u -r1.39 fusiondev.c
--- linux/drivers/char/fusion/fusiondev.c       26 Nov 2004 10:16:28 -0000      
1.39
+++ linux/drivers/char/fusion/fusiondev.c       2 Sep 2005 03:08:59 -0000
@@ -68,8 +68,12 @@
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+static struct class *fusion_class;
+#else
 static struct class_simple *fusion_class;
 #endif
+#endif
 
 
/******************************************************************************/
 
@@ -844,7 +848,11 @@
      }
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+     fusion_class = class_create (THIS_MODULE, "fusion");
+#else
      fusion_class = class_simple_create (THIS_MODULE, "fusion");
+#endif
      if (IS_ERR(fusion_class)) {
           unregister_chrdev (FUSION_MAJOR, "fusion");
           return PTR_ERR(fusion_class);
@@ -855,10 +863,16 @@
 
      for (i=0; i<NUM_MINORS; i++) {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+          class_device_create (fusion_class,
+                               MKDEV(FUSION_MAJOR, i),
+                               NULL, "fusion%d", i);
+#else
           class_simple_device_add (fusion_class,
                                    MKDEV(FUSION_MAJOR, i),
                                    NULL, "fusion%d", i);
 #endif
+#endif
 
           devfs_mk_cdev (MKDEV(FUSION_MAJOR, i),
                          S_IFCHR | S_IRUSR | S_IWUSR,
@@ -918,15 +932,23 @@
 
      for (i=0; i<NUM_MINORS; i++) {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+          class_device_destroy (fusion_class, MKDEV(FUSION_MAJOR, i));
+#else
           class_simple_device_remove (MKDEV(FUSION_MAJOR, i));
 #endif
+#endif
 
           devfs_remove ("fusion/%d", i);
      }
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+     class_destroy (fusion_class);
+#else
      class_simple_destroy (fusion_class);
 #endif
+#endif
 
      devfs_remove ("fusion");
 }
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to