summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-06-08 18:09:51 +0000
committerthompsa <thompsa@FreeBSD.org>2009-06-08 18:09:51 +0000
commitaef77db9311982ff7db0a801a142435ce619c5b0 (patch)
tree784e4e68175549a6caf0acdb68c2413c0fa08377
parent70abc0766a93a8f9061b9a33f6ea9e9cafe905c9 (diff)
downloadFreeBSD-src-aef77db9311982ff7db0a801a142435ce619c5b0.zip
FreeBSD-src-aef77db9311982ff7db0a801a142435ce619c5b0.tar.gz
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
-rw-r--r--sys/dev/usb/usb_core.h3
-rw-r--r--sys/dev/usb/usb_lookup.h8
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/usb/usb_core.h b/sys/dev/usb/usb_core.h
index 4b0e484..d35351c 100644
--- a/sys/dev/usb/usb_core.h
+++ b/sys/dev/usb/usb_core.h
@@ -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 */
diff --git a/sys/dev/usb/usb_lookup.h b/sys/dev/usb/usb_lookup.h
index b30c50b..759d0b9 100644
--- a/sys/dev/usb/usb_lookup.h
+++ b/sys/dev/usb/usb_lookup.h
@@ -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,
OpenPOWER on IntegriCloud