[usb] Allow USB device IDs to include arbitrary driver-specific data

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-12-07 00:32:08 +00:00
parent eb1fc1e957
commit fb8c52de9b
2 changed files with 9 additions and 3 deletions

View File

@@ -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;
}