diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2014-01-10 19:36:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-10 16:54:35 -0800 |
commit | 2fc82c2de604deabb86b0558be0a301bb2209a19 (patch) | |
tree | 968d174a545222b71a3e43d44ab10b21fb0c5ac4 /drivers/usb/serial | |
parent | c63fe8f6ca3669f1d120ff70523e2911b9966574 (diff) | |
download | linux-2fc82c2de604deabb86b0558be0a301bb2209a19.tar.gz linux-2fc82c2de604deabb86b0558be0a301bb2209a19.tar.bz2 linux-2fc82c2de604deabb86b0558be0a301bb2209a19.zip |
usb: core: allow a reference device for new_id
Often, usb drivers need some driver_info to get a device to work. To
have access to driver_info when using new_id, allow to pass a reference
vendor:product tuple from which new_id will inherit driver_info.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/bus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 6335490d5760..35a2373cde67 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -125,10 +125,12 @@ static ssize_t new_id_store(struct device_driver *driver, const char *buf, size_t count) { struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver); - ssize_t retval = usb_store_new_id(&usb_drv->dynids, driver, buf, count); + ssize_t retval = usb_store_new_id(&usb_drv->dynids, usb_drv->id_table, + driver, buf, count); if (retval >= 0 && usb_drv->usb_driver != NULL) retval = usb_store_new_id(&usb_drv->usb_driver->dynids, + usb_drv->usb_driver->id_table, &usb_drv->usb_driver->drvwrap.driver, buf, count); return retval; |