Commit 9a1a4649 authored by Henning Meier-Geinitz's avatar Henning Meier-Geinitz Committed by Greg Kroah-Hartman

[PATCH] scanner.c, scanner.h: Use symbolic name for interface class

Hi,

On Wed, Jan 08, 2003 at 08:29:36AM -0800, Greg KH wrote:
> On Tue, Dec 24, 2002 at 05:44:55PM +0100, Henning Meier-Geinitz wrote:
> > Hi,
> >
> > On Tue, Dec 24, 2002 at 12:40:06AM +0100, Oliver Neukum wrote:
> > >
> > > > Well, the reason I didn't use one was that I didn't found one in
> > > > usb.h/usb_ch9.h for 16. It's also not listed on www.usb.org.
> > > >
> > > > lsusb calls it "Data". However, I'm not sure if this is a hex/dec
> > > > error and they really mean "Data" = dec 10, not 0x10 (=dec 16).
> > > >
> > > > Shall I define a local symbolic name (e.g.
> > > > STRANGE_HP_SCANJET_INTERFACE_CLASS)? But I really don't know what this
> > > > class is. I only know that it's used by a Hewlett-Packard ScanJet
> > > > 3300c and Genius HR6 USB - Vivid III.
> > >
> > > Better that than a bare number.
> >
> > Patch attached.
>
> Applied to my 2.4 tree, sorry for the delay.

Here is the same for 2.5.44:
parent c8951af4
......@@ -874,7 +874,7 @@ probe_scanner(struct usb_interface *intf,
if (interface[0].desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC &&
interface[0].desc.bInterfaceClass != USB_CLASS_PER_INTERFACE &&
interface[0].desc.bInterfaceClass != 16) {
interface[0].desc.bInterfaceClass != SCN_CLASS_SCANJET) {
dbg("probe_scanner: This interface doesn't look like a scanner (class=0x%x).", interface[0].desc.bInterfaceClass);
return -ENODEV;
}
......
......@@ -270,6 +270,9 @@ MODULE_DEVICE_TABLE (usb, scanner_device_ids);
/* send/recv a control message to the scanner */
#define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, struct usb_ctrlrequest)
/* USB bInterfaceClass used by Hewlett-Packard ScanJet 3300c and Genius HR6
USB - Vivid III */
#define SCN_CLASS_SCANJET 16
#ifdef CONFIG_USB_DYNAMIC_MINORS
#define SCN_MAX_MNR 256
......
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