mirror of https://github.com/ipxe/ipxe.git
[usb] Allow USB device IDs to include arbitrary driver-specific data
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/43/head
parent
eb1fc1e957
commit
fb8c52de9b
|
@ -1186,6 +1186,11 @@ static int usb_probe ( struct usb_function *func,
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
/* Record driver */
|
||||
func->driver = driver;
|
||||
func->id = id;
|
||||
func->dev.driver_name = id->name;
|
||||
|
||||
/* Probe driver */
|
||||
if ( ( rc = driver->probe ( func, config ) ) != 0 ) {
|
||||
DBGC ( usb, "USB %s failed to probe driver %s: %s\n",
|
||||
|
@ -1193,9 +1198,6 @@ static int usb_probe ( struct usb_function *func,
|
|||
return rc;
|
||||
}
|
||||
|
||||
/* Record driver */
|
||||
func->driver = driver;
|
||||
func->dev.driver_name = id->name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -662,6 +662,8 @@ struct usb_function {
|
|||
struct usb_driver *driver;
|
||||
/** Driver private data */
|
||||
void *priv;
|
||||
/** Driver device ID */
|
||||
struct usb_device_id *id;
|
||||
|
||||
/** List of interface numbers
|
||||
*
|
||||
|
@ -1308,6 +1310,8 @@ struct usb_device_id {
|
|||
uint16_t vendor;
|
||||
/** Product ID */
|
||||
uint16_t product;
|
||||
/** Arbitrary driver data */
|
||||
unsigned long driver_data;
|
||||
};
|
||||
|
||||
/** Match-anything ID */
|
||||
|
|
Loading…
Reference in New Issue