patch-2.4.11-dontuse linux/drivers/usb/dsbr100.c

Next file: linux/drivers/usb/hpusbscsi.c
Previous file: linux/drivers/usb/audio.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/usb/dsbr100.c linux/drivers/usb/dsbr100.c
@@ -64,6 +64,7 @@
 #include <linux/input.h>
 #include <linux/videodev.h>
 #include <linux/usb.h>
+#include <linux/smp_lock.h>
 
 /*
  * Version Information
@@ -194,10 +195,14 @@
 {
 	usb_dsbr100 *radio=ptr;
 
-	if (users)
+	lock_kernel();
+	if (users) {
+		unlock_kernel();
 		return;
+	}
 	kfree(radio);
 	usb_dsbr100_radio.priv = NULL;
+	unlock_kernel();
 }
 
 static int usb_dsbr100_ioctl(struct video_device *dev, unsigned int cmd, 
@@ -362,6 +367,7 @@
 
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
 
 /*
 vi: ts=8

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)