Date: Mon, 8 Jun 2009 18:09:51 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193733 - head/sys/dev/usb Message-ID: <200906081809.n58I9pMe037732@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Mon Jun 8 18:09:51 2009 New Revision: 193733 URL: http://svn.freebsd.org/changeset/base/193733 Log: Change driver_info to a ulong as it always stores a number and remove the only diff of the usb_device_id struct to Linux. Reviewed by: HPS Modified: head/sys/dev/usb/usb_core.h head/sys/dev/usb/usb_lookup.h Modified: head/sys/dev/usb/usb_core.h ============================================================================== --- head/sys/dev/usb/usb_core.h Mon Jun 8 17:27:25 2009 (r193732) +++ head/sys/dev/usb/usb_core.h Mon Jun 8 18:09:51 2009 (r193733) @@ -485,7 +485,8 @@ struct usb_lookup_info { struct usb_attach_arg { struct usb_lookup_info info; device_t temp_dev; /* for internal use */ - const void *driver_info; /* for internal use */ + unsigned long driver_info; /* for internal use */ + void *driver_ivar; struct usb_device *device; /* current device */ struct usb_interface *iface; /* current interface */ enum usb_hc_mode usb_mode; /* host or device mode */ Modified: head/sys/dev/usb/usb_lookup.h ============================================================================== --- head/sys/dev/usb/usb_lookup.h Mon Jun 8 17:27:25 2009 (r193732) +++ head/sys/dev/usb/usb_lookup.h Mon Jun 8 18:09:51 2009 (r193733) @@ -37,7 +37,7 @@ struct usb_attach_arg; struct usb_device_id { /* Hook for driver specific information */ - const void *driver_info; + unsigned long driver_info; /* Used for product specific matches; the BCD range is inclusive */ uint16_t idVendor; @@ -107,11 +107,11 @@ struct usb_device_id { #define USB_IF_CSI(class,subclass,info) \ USB_IFACE_CLASS(class), USB_IFACE_SUBCLASS(subclass), USB_DRIVER_INFO(info) -#define USB_DRIVER_INFO(ptr) \ - .driver_info = ((const void *)(ptr)) +#define USB_DRIVER_INFO(n) \ + .driver_info = (n) #define USB_GET_DRIVER_INFO(did) \ - (((const uint8_t *)((did)->driver_info)) - ((const uint8_t *)0)) + (did)->driver_info const struct usb_device_id *usb2_lookup_id_by_info( const struct usb_device_id *id, usb_size_t sizeof_id,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906081809.n58I9pMe037732>