Module Name:    src
Committed By:   jakllsch
Date:           Wed Dec 30 20:38:47 UTC 2009

Modified Files:
        src/sys/dev/usb: ums.c

Log Message:
Apply patch from Matthias Pfaller in PR/42546.

The USB HUT v1.11 document states that:
    "Typical system software will search for application
     collections tagged with either a Mouse or a Pointer usage."

This patch adjusts ums(4) to match not only on
the Mouse usage, but also on the Pointer usage.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/ums.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ums.c
diff -u src/sys/dev/usb/ums.c:1.77 src/sys/dev/usb/ums.c:1.78
--- src/sys/dev/usb/ums.c:1.77	Fri Nov 27 08:35:05 2009
+++ src/sys/dev/usb/ums.c	Wed Dec 30 20:38:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ums.c,v 1.77 2009/11/27 08:35:05 mbalmer Exp $	*/
+/*	$NetBSD: ums.c,v 1.78 2009/12/30 20:38:47 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.77 2009/11/27 08:35:05 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.78 2009/12/30 20:38:47 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -137,7 +137,9 @@
 
 	uhidev_get_report_desc(uha->parent, &desc, &size);
 	if (!hid_is_collection(desc, size, uha->reportid,
-			       HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)))
+			       HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)) &&
+	    !hid_is_collection(desc, size, uha->reportid,
+			       HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_POINTER)))
 		return (UMATCH_NONE);
 
 	return (UMATCH_IFACECLASS);

Reply via email to