patch-2.4.0-test2 linux/drivers/usb/dc2xx.c

Next file: linux/drivers/usb/devio.c
Previous file: linux/drivers/usb/dabusb.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/usb/dc2xx.c linux/drivers/usb/dc2xx.c
@@ -82,8 +82,8 @@
 
 /* table of cameras that work through this driver */
 static const struct camera {
-	short		idVendor;
-	short		idProduct;
+	unsigned short	idVendor;
+	unsigned short	idProduct;
 	/* plus hooks for camera-specific info if needed */
 } cameras [] = {
 	/* These have the same application level protocol */  
@@ -98,7 +98,7 @@
     { 0x040a, 0x0110 },		// Kodak DC-260
     { 0x040a, 0x0111 },		// Kodak DC-265
     { 0x040a, 0x0112 },		// Kodak DC-290
-//  { 0x03f0, 0xffff },		// HP PhotoSmart C500
+    { 0xf003, 0x6002 },		// HP PhotoSmart C500
 
 	/* Other USB devices may well work here too, so long as they
 	 * just stick to half duplex bulk packet exchanges.  That
@@ -284,9 +284,6 @@
 	}
 
 	dbg ("open"); 
-	
-	/* Keep driver from being unloaded while it's in use */
-	MOD_INC_USE_COUNT;
 
 	camera->isActive = 0;
 	file->private_data = camera;
@@ -306,8 +303,6 @@
 		kfree (camera);
 	}
 
-	MOD_DEC_USE_COUNT;
-
 	dbg ("close"); 
 
 	return 0;
@@ -319,6 +314,7 @@
 	 */
 static /* const */ struct file_operations usb_camera_fops = {
 	    /* Uses GCC initializer extension; simpler to maintain */
+	owner:		THIS_MODULE,
 	read:		camera_read,
 	write:		camera_write,
 	open:		camera_open,

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