Skip to contentSkip to conversation

staging/lirc_parallel: fix panic on rmmod

PATCH Dave Jones 1 participant 1 message Jul 11, 2011 Staging

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

lirc_parallel seems to leave a bunch of stuff around after rmmod. Without the patch below modprobe ; rmmod ; modprobe will cause a panic.

There are still some remaining problems, (double registration of sysfs files) but this patch is at least a start to survive the panic.

drivers/staging/lirc/lirc_parallel.c +3 -0
index 50724c4..70db1d1 100644
@@ -730,6 +730,9 @@ static void __exit lirc_parallel_exit(void)
 {
 	parport_unregister_device(ppdevice);
 	lirc_unregister_driver(driver.minor);
+
+	platform_device_unregister(lirc_parallel_dev);
+	platform_driver_unregister(&lirc_parallel_driver);
 }
 
 module_init(lirc_parallel_init);