Hi,

This patch removes the inofficial ioctls that were used to support the
PV8630 USB-over-Parport chipset. They were already 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 -r linux-2.4.21-pre3.user_supplied/drivers/usb/scanner.c 
linux-2.4.21-pre3.pv/drivers/usb/scanner.c
--- linux-2.4.21-pre3.user_supplied/drivers/usb/scanner.c       2003-01-12 
23:30:16.000000000 +0100
+++ linux-2.4.21-pre3.pv/drivers/usb/scanner.c  2003-01-13 00:03:49.000000000 +0100
@@ -334,13 +334,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
  *
  *
@@ -723,54 +723,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);
-
-               if (copy_to_user((void *)arg, &args, sizeof(args)))
-                       retval = -EFAULT;
-
-               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;
-               }
-
-               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);
-
-               break;
-       }
-#endif /* PV8630 */
        case SCANNER_IOCTL_CTRLMSG:
        {
                struct ctrlmsg_ioctl {
diff -u -r linux-2.4.21-pre3.user_supplied/drivers/usb/scanner.h 
linux-2.4.21-pre3.pv/drivers/usb/scanner.h
--- linux-2.4.21-pre3.user_supplied/drivers/usb/scanner.h       2003-01-12 
23:32:54.000000000 +0100
+++ linux-2.4.21-pre3.pv/drivers/usb/scanner.h  2003-01-13 00:07:27.000000000 +0100
@@ -35,13 +35,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>
@@ -267,13 +261,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: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to