Re: [PATCH 4.19.y-cip 04/23] usb: roles: Find the muxes by also matching against the device node

Pavel Machek
2020-02-19T07:51:16Z

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

Hi!

> @@ -84,7 +85,12 @@ enum usb_role usb_role_switch_get_role(struct usb_role_switch *sw)
> }
> EXPORT_SYMBOL_GPL(usb_role_switch_get_role);
>
> -static int __switch_match(struct device *dev, const void *name)
> +static int switch_fwnode_match(struct device *dev, const void *fwnode)
> +{
> + return dev_fwnode(dev) == fwnode;
> +}
> +
> +static int switch_name_match(struct device *dev, const void *name)
> {
> return !strcmp((const char *)name, dev_name(dev));
> }

This renames __switch_match -> switch_name_match. That is welcome
cleanup for mainline, but not quite neccessary change here. As the
function is static and local to the file, we can live with that,
but I hope you have not had to do extra effort to backport it :-).

Best regards,

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]