From 7ab45e978a735022ee48fa61594808a5cc2c75db Mon Sep 17 00:00:00 2001 From: Josef Karthauser Date: Wed, 31 Jul 2002 09:05:52 +0000 Subject: Enable the HP 2200C and Visioneer Scanport 3000 scanners, and remove some trailing spaces whilst I'm here. Obtained from: NetBSD. --- sys/dev/usb/usbdevs | 1 + sys/dev/usb/uscanner.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index f1af1ce3aea09..b666096c0fbcc 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1076,6 +1076,7 @@ product VISION VC6452V002 0x0002 CPiA Camera /* Visioneer products */ product VISIONEER 7600 0x0211 OneTouch 7600 product VISIONEER 5300 0x0221 OneTouch 5300 +product VISIONEER 3000 0x0224 Scanport 3000 product VISIONEER 6100 0x0231 OneTouch 6100 product VISIONEER 6200 0x0311 OneTouch 6200 product VISIONEER 8100 0x0321 OneTouch 8100 diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 0c2b6f2eaa890..c68f720266606 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -1,4 +1,4 @@ -/* $NetBSD: uscanner.c,v 1.26 2001/12/31 12:15:22 augustss Exp $ */ +/* $NetBSD: uscanner.c,v 1.30 2002/07/11 21:14:36 augustss Exp$ */ /* $FreeBSD$ */ /* @@ -116,6 +116,7 @@ static const struct uscan_info uscanner_devs[] = { {{ USB_VENDOR_KYE, USB_PRODUCT_KYE_VIVIDPRO }, 0 }, /* HP */ + {{ USB_VENDOR_HP, USB_PRODUCT_HP_2200C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_3300C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_3400CSE }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4100C }, 0 }, @@ -186,6 +187,7 @@ static const struct uscan_info uscanner_devs[] = { {{ USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA3400 }, 0 }, /* Visioneer */ + {{ USB_VENDOR_VISIONEER, USB_PRODUCT_VISIONEER_3000 }, 0 }, {{ USB_VENDOR_VISIONEER, USB_PRODUCT_VISIONEER_5300 }, 0 }, {{ USB_VENDOR_VISIONEER, USB_PRODUCT_VISIONEER_7600 }, 0 }, {{ USB_VENDOR_VISIONEER, USB_PRODUCT_VISIONEER_6100 }, 0 }, @@ -365,7 +367,7 @@ uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p) USB_GET_SC_OPEN(uscanner, unit, sc); - DPRINTFN(5, ("uscanneropen: flag=%d, mode=%d, unit=%d\n", + DPRINTFN(5, ("uscanneropen: flag=%d, mode=%d, unit=%d\n", flag, mode, unit)); if (sc->sc_dying) @@ -669,12 +671,12 @@ uscannerpoll(dev_t dev, int events, usb_proc_ptr p) if (sc->sc_dying) return (EIO); - /* + /* * We have no easy way of determining if a read will * yield any data or a write will happen. * Pretend they will. */ - revents |= events & + revents |= events & (POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM); return (revents); -- cgit v1.3