Message ID | 20200804113834.6409-1-hadess@hadess.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v7,1/3] USB: Also check for ->match | expand |
On Tue, Aug 04, 2020 at 01:38:32PM +0200, Bastien Nocera wrote: > We only ever used the ID table matching before, but we should probably > also support an open-coded match function. > > Fixes: 88b7381a939de ("USB: Select better matching USB drivers when available") > Signed-off-by: Bastien Nocera <hadess@hadess.net> > Acked-by: Alan Stern <stern@rowland.harvard.edu> The subject line does not make sense, what is "also"? Who is doing this? Coming back to this after a week I have no idea what is going on, so that's a sign that it needs to be reworded :( thanks, greg k-h
On Tue, 2020-08-18 at 11:00 +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 04, 2020 at 01:38:32PM +0200, Bastien Nocera wrote: > > We only ever used the ID table matching before, but we should > > probably > > also support an open-coded match function. > > > > Fixes: 88b7381a939de ("USB: Select better matching USB drivers when > > available") > > Signed-off-by: Bastien Nocera <hadess@hadess.net> > > Acked-by: Alan Stern <stern@rowland.harvard.edu> > > The subject line does not make sense, what is "also"? Who is doing > this? > > Coming back to this after a week I have no idea what is going on, so > that's a sign that it needs to be reworded :( It's actually been 2 weeks. Were there any other changes you wanted made in this patchset, or is that going to be it?
On Tue, Aug 18, 2020 at 11:42:23AM +0200, Bastien Nocera wrote: > On Tue, 2020-08-18 at 11:00 +0200, Greg Kroah-Hartman wrote: > > On Tue, Aug 04, 2020 at 01:38:32PM +0200, Bastien Nocera wrote: > > > We only ever used the ID table matching before, but we should > > > probably > > > also support an open-coded match function. > > > > > > Fixes: 88b7381a939de ("USB: Select better matching USB drivers when > > > available") > > > Signed-off-by: Bastien Nocera <hadess@hadess.net> > > > Acked-by: Alan Stern <stern@rowland.harvard.edu> > > > > The subject line does not make sense, what is "also"? Who is doing > > this? > > > > Coming back to this after a week I have no idea what is going on, so > > that's a sign that it needs to be reworded :( > > It's actually been 2 weeks. Were there any other changes you wanted > made in this patchset, or is that going to be it? I think that's it.
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index b6f2d4b44754..2b2f1ab6e36a 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -205,8 +205,9 @@ static int __check_usb_generic(struct device_driver *drv, void *data) udrv = to_usb_device_driver(drv); if (udrv == &usb_generic_driver) return 0; - - return usb_device_match_id(udev, udrv->id_table) != NULL; + if (usb_device_match_id(udev, udrv->id_table) != NULL) + return 1; + return (udrv->match && udrv->match(udev)); } static bool usb_generic_driver_match(struct usb_device *udev)