summaryrefslogtreecommitdiffstats
path: root/drivers/usb/scanner.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
commit529c593ece216e4aaffd36bd940cb94f1fa63129 (patch)
tree78f1c0b805f5656aa7b0417a043c5346f700a2cf /drivers/usb/scanner.h
parent0bd079751d25808d1972baee5c4eaa1db2227257 (diff)
Merge with 2.3.43. I did ignore all modifications to the qlogicisp.c
driver due to the Origin A64 hacks.
Diffstat (limited to 'drivers/usb/scanner.h')
-rw-r--r--drivers/usb/scanner.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/usb/scanner.h b/drivers/usb/scanner.h
index 996eb7f59..b1bac6018 100644
--- a/drivers/usb/scanner.h
+++ b/drivers/usb/scanner.h
@@ -18,6 +18,8 @@
#define IS_EP_BULK_OUT(ep) (IS_EP_BULK(ep) && ((ep).bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)
#define IS_EP_INTR(ep) ((ep).bmAttributes == USB_ENDPOINT_XFER_INT ? 1 : 0)
+#define USB_SCN_MINOR(X) MINOR((X)->i_rdev) - SCN_BASE_MNR
+
#ifdef DEBUG
#define SCN_DEBUG(X) X
#else
@@ -30,19 +32,25 @@
/* FIXME: These are NOT registered ioctls()'s */
-#define PV8630_RECEIVE 69
-#define PV8630_SEND 70
+#define PV8630_IOCTL_INREQUEST 69
+#define PV8630_IOCTL_OUTREQUEST 70
+
+#define SCN_MAX_MNR 16 /* We're allocated 16 minors */
+#define SCN_BASE_MNR 48 /* USB Scanners start at minor 48 */
-struct hpscan_usb_data {
- struct usb_device *hpscan_dev;
- int isopen; /* Not zero if the device is open */
- int present; /* Device is present on the bus */
+struct scn_usb_data {
+ struct usb_device *scn_dev;
+ struct urb scn_irq;
+ unsigned int ifnum; /* Interface number of the USB device */
+ kdev_t scn_minor; /* Scanner minor - used in disconnect() */
+ unsigned char button; /* Front panel buffer */
+ char isopen; /* Not zero if the device is open */
+ char present; /* Not zero if device is present */
char *obuf, *ibuf; /* transfer buffers */
char bulk_in_ep, bulk_out_ep, intr_ep; /* Endpoint assignments */
- char *button; /* Front panel button buffer */
};
-static struct hpscan_usb_data hpscan;
+static struct scn_usb_data *p_scn_table[SCN_MAX_MNR] = { NULL, /* ... */};
MODULE_AUTHOR("David E. Nelson, dnelson@jump.net, http://www.jump.net/~dnelson");
MODULE_DESCRIPTION("USB Scanner Driver");
@@ -53,3 +61,6 @@ MODULE_PARM_DESC(vendor, "User specified USB idVendor");
MODULE_PARM(product, "i");
MODULE_PARM_DESC(product, "User specified USB idProduct");
+
+/* Forward declarations */
+static struct usb_driver scanner_driver;