Hi,
This patch removes the inofficial ioctls that were used to support the
PV8630 USB-over-Parport chipset. They were alreaded ifdefed out.
Instead of them, the more generic (and official) SCANNER_IOCTL_CTRLMSG
should be used. The last software that used the old ioctl
(sane-hp4200) switched to the new ioctls a long time ago.
This patch is ontop of the "user-supplied" patch.
Bye,
Henning
diff -u linux-2.5.54-cleanup/drivers/usb/image/scanner.c
linux-2.5.54-pv/drivers/usb/image/scanner.c
--- linux-2.5.54-cleanup/drivers/usb/image/scanner.c 2003-01-07 23:04:56.000000000
+0100
+++ linux-2.5.54-pv/drivers/usb/image/scanner.c 2003-01-07 23:51:21.000000000 +0100
@@ -335,13 +335,13 @@
* - Added vendor/product ids for Visioneer scanners.
* - Print information about user-supplied ids only once at startup instead
* of everytime any USB device is plugged in.
- *
+ * - Removed PV8630 ioctls. Use the standard ioctls instead.
+ *
* TODO
* - Remove the 2/3 endpoint limitation
* - Performance
* - Select/poll methods
* - More testing
- * - Proper registry/assignment for LM9830 ioctl's
* - More general usage ioctl's
*
*
@@ -736,62 +736,6 @@
case SCANNER_IOCTL_PRODUCT :
retval = (put_user(dev->descriptor.idProduct, (unsigned int *) arg));
break;
-#ifdef PV8630
- case PV8630_IOCTL_INREQUEST :
- {
- struct {
- __u8 data;
- __u8 request;
- __u16 value;
- __u16 index;
- } args;
-
- if (copy_from_user(&args, (void *)arg, sizeof(args))) {
- retval = -EFAULT;
- break;
- }
-
- retval = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
- args.request, USB_TYPE_VENDOR|
- USB_RECIP_DEVICE|USB_DIR_IN,
- args.value, args.index, &args.data,
- 1, HZ*5);
-
- dbg("ioctl_scanner(%d): inreq: args.data:%x args.value:%x
args.index:%x args.request:%x\n", scn_minor, args.data, args.value, args.index,
args.request);
-
- if (copy_to_user((void *)arg, &args, sizeof(args)))
- retval = -EFAULT;
-
- dbg("ioctl_scanner(%d): inreq: result:%d\n", scn_minor, retval);
-
- break;
- }
- case PV8630_IOCTL_OUTREQUEST :
- {
- struct {
- __u8 request;
- __u16 value;
- __u16 index;
- } args;
-
- if (copy_from_user(&args, (void *)arg, sizeof(args))) {
- retval = -EFAULT;
- break;
- }
-
- dbg("ioctl_scanner(%d): outreq: args.value:%x args.index:%x
args.request:%x\n", scn_minor, args.value, args.index, args.request);
-
- retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
- args.request, USB_TYPE_VENDOR|
- USB_RECIP_DEVICE|USB_DIR_OUT,
- args.value, args.index, NULL,
- 0, HZ*5);
-
- dbg("ioctl_scanner(%d): outreq: result:%d\n", scn_minor, retval);
-
- break;
- }
-#endif /* PV8630 */
case SCANNER_IOCTL_CTRLMSG:
{
struct ctrlmsg_ioctl {
diff -u linux-2.5.54-cleanup/drivers/usb/image/scanner.h
linux-2.5.54-pv/drivers/usb/image/scanner.h
--- linux-2.5.54-cleanup/drivers/usb/image/scanner.h 2003-01-07 23:09:46.000000000
+0100
+++ linux-2.5.54-pv/drivers/usb/image/scanner.h 2003-01-07 23:54:59.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Driver for USB Scanners (linux-2.5.52)
+ * Driver for USB Scanners (linux-2.5.54)
*
* Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
*
@@ -38,13 +38,7 @@
// #define DEBUG
-/* Enable this to support the older ioctl interfaces scanners that
- * a PV8630 Scanner-On-Chip. The prefered method is the
- * SCANNER_IOCTL_CTRLMSG ioctl.
- */
-//#define PV8630
-
-#define DRIVER_VERSION "0.4.9"
+#define DRIVER_VERSION "0.4.10"
#define DRIVER_DESC "USB Scanner Driver"
#include <linux/usb.h>
@@ -270,13 +264,6 @@
#define RD_EXPIRE 12 /* Number of attempts to wait X seconds */
-/* FIXME: These are NOT registered ioctls()'s */
-#ifdef PV8630
-#define PV8630_IOCTL_INREQUEST 69
-#define PV8630_IOCTL_OUTREQUEST 70
-#endif /* PV8630 */
-
-
/* read vendor and product IDs from the scanner */
#define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
#define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel