Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/dev Make sure the interface protocol is UIPR...



details:   https://anonhg.NetBSD.org/src/rev/7eeea7336ae1
branches:  trunk
changeset: 758894:7eeea7336ae1
user:      phx <phx%NetBSD.org@localhost>
date:      Fri Nov 19 18:27:12 2010 +0000

description:
Make sure the interface protocol is UIPROTO_MOUSE, before we attach.

diffstat:

 sys/arch/macppc/dev/pbms.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 7f5d0ed41df0 -r 7eeea7336ae1 sys/arch/macppc/dev/pbms.c
--- a/sys/arch/macppc/dev/pbms.c        Fri Nov 19 18:21:48 2010 +0000
+++ b/sys/arch/macppc/dev/pbms.c        Fri Nov 19 18:27:12 2010 +0000
@@ -1,4 +1,4 @@
-/* $Id: pbms.c,v 1.10 2010/11/08 12:06:47 pooka Exp $ */
+/* $Id: pbms.c,v 1.11 2010/11/19 18:27:12 phx Exp $ */
 
 /*
  * Copyright (c) 2005, Johan Wallén
@@ -301,7 +301,8 @@
         * We just check if the vendor and product IDs have the magic numbers
         * we expect. 
         */
-       if ((udd = usbd_get_device_descriptor(uha->parent->sc_udev)) != NULL) {
+       if (uha->uaa->proto == UIPROTO_MOUSE &&
+           (udd = usbd_get_device_descriptor(uha->parent->sc_udev)) != NULL) {
                vendor = UGETW(udd->idVendor);
                product = UGETW(udd->idProduct);
                for (i = 0; i < PBMS_NUM_DEVICES; i++) {



Home | Main Index | Thread Index | Old Index