Commit 31c6bf70 authored by Bjørn Mork's avatar Bjørn Mork Committed by Greg Kroah-Hartman

usb: core: let dynamic ids override static ids

This modifies the probing order so that any matching
dynamic entry always will be used, even if the driver
has a matching static entry.

It is sometimes useful to dynamically update existing
device entries. With the new ability to set the dynamic
entry driver_info field, this can be used to test new
additions to class driver exception lists or proposed
changes to existing static per-device driver_info
entries.
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 823d12c9
...@@ -302,9 +302,9 @@ static int usb_probe_interface(struct device *dev) ...@@ -302,9 +302,9 @@ static int usb_probe_interface(struct device *dev)
return error; return error;
} }
id = usb_match_id(intf, driver->id_table);
if (!id)
id = usb_match_dynamic_id(intf, driver); id = usb_match_dynamic_id(intf, driver);
if (!id)
id = usb_match_id(intf, driver->id_table);
if (!id) if (!id)
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment