SOURCES: lirc-2.6.23.patch (NEW) - fix for lirc for kernel 2.6.23, ...

hawk hawk at pld-linux.org
Thu Jan 24 22:21:17 CET 2008


Author: hawk                         Date: Thu Jan 24 21:21:17 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix for lirc for kernel 2.6.23, taken from gentoo

---- Files affected:
SOURCES:
   lirc-2.6.23.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/lirc-2.6.23.patch
diff -u /dev/null SOURCES/lirc-2.6.23.patch:1.1
--- /dev/null	Thu Jan 24 22:21:17 2008
+++ SOURCES/lirc-2.6.23.patch	Thu Jan 24 22:21:12 2008
@@ -0,0 +1,37 @@
+diff -u -r -p lirc-0.8.2-orig/drivers/lirc_dev/lirc_dev.c lirc-0.8.2/drivers/lirc_dev/lirc_dev.c
+--- lirc-0.8.2-orig/drivers/lirc_dev/lirc_dev.c	2007-02-13 07:45:15.000000000 +0100
++++ lirc-0.8.2/drivers/lirc_dev/lirc_dev.c	2007-10-11 20:45:01.000000000 +0200
+@@ -880,8 +880,13 @@ static int lirc_dev_init(void)
+ 	return SUCCESS;
+ 
+ out_unregister:
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++	/* unregister_chrdev returns void now */
++	unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
++#else
+ 	if(unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME))
+ 		printk(KERN_ERR "lirc_dev: unregister_chrdev failed!\n");
++#endif
+ out:
+ 	return -1;
+ }
+@@ -905,6 +910,11 @@ int init_module(void)
+  */
+ void cleanup_module(void)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++	/* unregister_chrdev returns void now */
++	unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
++	class_destroy(lirc_class);
++#else
+ 	int ret;
+ 
+ 	ret = unregister_chrdev(IRCTL_DEV_MAJOR, IRCTL_DEV_NAME);
+@@ -914,6 +924,7 @@ void cleanup_module(void)
+ 		printk("lirc_dev: error in module_unregister_chrdev: %d\n", ret);
+ 	else
+ 		dprintk("lirc_dev: module successfully unloaded\n");
++#endif
+ }
+ 
+ MODULE_DESCRIPTION("LIRC base driver module");
================================================================


More information about the pld-cvs-commit mailing list