Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitadb6e6a

Browse files
hadessgregkh
authored andcommitted
USB: Also match device drivers using the ->match vfunc
We only ever used the ID table matching before, but we should also supportopen-coded match functions.Fixes:88b7381 ("USB: Select better matching USB drivers when available")Signed-off-by: Bastien Nocera <hadess@hadess.net>Cc: stable <stable@vger.kernel.org>Acked-by: Alan Stern <stern@rowland.harvard.edu>Link:https://lore.kernel.org/r/20200818110445.509668-1-hadess@hadess.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parentd54343a commitadb6e6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎drivers/usb/core/generic.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ static int __check_usb_generic(struct device_driver *drv, void *data)
205205
udrv=to_usb_device_driver(drv);
206206
if (udrv==&usb_generic_driver)
207207
return0;
208-
209-
returnusb_device_match_id(udev,udrv->id_table)!=NULL;
208+
if (usb_device_match_id(udev,udrv->id_table)!=NULL)
209+
return1;
210+
return (udrv->match&&udrv->match(udev));
210211
}
211212

212213
staticboolusb_generic_driver_match(structusb_device*udev)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp