ChangeSet 1.879.9.24, 2003/01/07 15:34:35-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 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. diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c --- a/drivers/usb/image/scanner.c Wed Jan 8 11:56:33 2003 +++ b/drivers/usb/image/scanner.c Wed Jan 8 11:56:33 2003 @@ -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 -Nru a/drivers/usb/image/scanner.h b/drivers/usb/image/scanner.h --- a/drivers/usb/image/scanner.h Wed Jan 8 11:56:33 2003 +++ b/drivers/usb/image/scanner.h Wed Jan 8 11:56:33 2003 @@ -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 @@ -268,13 +262,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 */