patch-2.3.22 linux/drivers/usb/hp_scanner.c
Next file: linux/drivers/usb/mouse.c
Previous file: linux/drivers/usb/ezusb.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Tue Oct 12 13:25:07 1999
- Orig file:
v2.3.21/linux/drivers/usb/hp_scanner.c
- Orig date:
Sat Oct 9 11:47:50 1999
diff -u --recursive --new-file v2.3.21/linux/drivers/usb/hp_scanner.c linux/drivers/usb/hp_scanner.c
@@ -59,8 +59,6 @@
* stuff may be some kind of maps and stuff but that's kinda rare. */
#define OBUF_SIZE 128
-#define USB_SCANNER_MAJOR 16
-
struct hpscan_usb_data {
struct usb_device *hpscan_dev; /* init: probe_scanner */
__u8 isopen; /* nz if open */
@@ -279,14 +277,6 @@
}
static struct
-usb_driver scanner_driver = {
- "usbscanner",
- probe_scanner,
- disconnect_scanner,
- { NULL, NULL }
-};
-
-static struct
file_operations usb_scanner_fops = {
NULL, /* seek */
read_scanner,
@@ -302,15 +292,19 @@
NULL, /* fasync */
};
+static struct
+usb_driver scanner_driver = {
+ "usbscanner",
+ probe_scanner,
+ disconnect_scanner,
+ { NULL, NULL },
+ &usb_scanner_fops,
+ 48
+};
+
int
usb_hp_scanner_init(void)
{
- int result;
-
- if ((result = register_chrdev(USB_SCANNER_MAJOR, "usbscanner", &usb_scanner_fops)) < 0) {
- printk(KERN_WARNING "hp_scanner: Cannot register device\n");
- return result;
- }
usb_register(&scanner_driver);
printk(KERN_DEBUG "USB Scanner support registered.\n");
return 0;
@@ -324,7 +318,6 @@
hps->present = 0;
usb_deregister(&scanner_driver);
- unregister_chrdev(USB_SCANNER_MAJOR, "usbscanner");
}
#ifdef MODULE
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)