ChangeSet 1.971.1.10, 2003/01/15 12:50:12-08:00, henning@meier-geinitz.de [PATCH] scanner.c, scanner.h: Remove PV8630 ioctls 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. diff -Nru a/drivers/usb/scanner.c b/drivers/usb/scanner.c --- a/drivers/usb/scanner.c Thu Jan 16 10:51:55 2003 +++ b/drivers/usb/scanner.c Thu Jan 16 10:51:55 2003 @@ -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 -Nru a/drivers/usb/scanner.h b/drivers/usb/scanner.h --- a/drivers/usb/scanner.h Thu Jan 16 10:51:55 2003 +++ b/drivers/usb/scanner.h Thu Jan 16 10:51:55 2003 @@ -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 @@ -265,13 +259,6 @@ /* read_scanner timeouts -- RD_NAK_TIMEOUT * RD_EXPIRE = Number of seconds */ #define RD_NAK_TIMEOUT (10*HZ) /* Default number of X seconds to wait */ #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 */