Commit 4ea79ead authored by Henning Meier-Geinitz's avatar Henning Meier-Geinitz Committed by Greg Kroah-Hartman

[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.
parent fd26d91e
......@@ -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 @@ ioctl_scanner(struct inode *inode, struct file *file,
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 {
......
/*
* 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 @@ MODULE_DEVICE_TABLE (usb, scanner_device_ids);
#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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment