From owner-p4-projects@FreeBSD.ORG Sun Sep 23 16:30:50 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 85C0416A41A; Sun, 23 Sep 2007 16:30:50 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EE7816A417 for ; Sun, 23 Sep 2007 16:30:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD4D13C44B for ; Sun, 23 Sep 2007 16:30:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8NGUo8G097328 for ; Sun, 23 Sep 2007 16:30:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8NGUn2A097324 for perforce@freebsd.org; Sun, 23 Sep 2007 16:30:49 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 23 Sep 2007 16:30:49 GMT Message-Id: <200709231630.l8NGUn2A097324@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126746 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2007 16:30:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=126746 Change 126746 by hselasky@hselasky_laptop001 on 2007/09/23 16:30:04 FYI; The comments follow the P4 diff from top to bottom. - no need to define "struct usb_hid_descriptor". Only the typedefed version. - make all prototypes fit on a single line - added two new prototypes: - hid_get_descriptor_from_usb - hid_read_report_desc_from_usb Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_hid.h#5 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_hid.h#5 (text+ko) ==== @@ -54,7 +54,7 @@ #define UR_GET_PROTOCOL 0x03 #define UR_SET_PROTOCOL 0x0b -typedef struct usb_hid_descriptor { +typedef struct { uByte bLength; uByte bDescriptorType; uWord bcdHID; @@ -225,28 +225,17 @@ struct hid_item *next; }; -extern struct hid_data * -hid_start_parse(const void *d, int len, int kindset); +/* prototypes from "usb_hid.c" */ -extern void -hid_end_parse(struct hid_data *s); - -extern int -hid_get_item(struct hid_data *s, struct hid_item *h); - -extern int -hid_report_size(const void *buf, int len, enum hid_kind k, u_int8_t *id); - -extern int -hid_locate(const void *desc, int size, u_int32_t usage, - enum hid_kind kind, struct hid_location *loc, - u_int32_t *flags); - -extern u_long -hid_get_data(const u_char *buf, u_int32_t len, struct hid_location *loc); - -extern int -hid_is_collection(const void *desc, int size, u_int32_t usage); +struct hid_data *hid_start_parse(const void *d, int len, int kindset); +void hid_end_parse(struct hid_data *s); +int hid_get_item(struct hid_data *s, struct hid_item *h); +int hid_report_size(const void *buf, int len, enum hid_kind k, u_int8_t *id); +int hid_locate(const void *desc, int size, u_int32_t usage, enum hid_kind kind, struct hid_location *loc, u_int32_t *flags); +u_long hid_get_data(const u_char *buf, u_int32_t len, struct hid_location *loc); +int hid_is_collection(const void *desc, int size, u_int32_t usage); +usb_hid_descriptor_t *hid_get_descriptor_from_usb(usb_config_descriptor_t *cd, usb_interface_descriptor_t *id); +usbd_status hid_read_report_desc_from_usb(struct usbd_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, usb_malloc_type mem, uint8_t iface_index); #endif