On Thu, Oct 05, 2017 at 11:21:49AM +0300, Mathias Nyman wrote: > From: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > > Use the of_device_get_match_data() helper instead of open coding. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> > --- > drivers/usb/host/xhci-plat.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c > index d0625fa..6804cd4 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -16,6 +16,7 @@ > #include <linux/module.h> > #include <linux/pci.h> > #include <linux/of.h> > +#include <linux/of_device.h> > #include <linux/platform_device.h> > #include <linux/usb/phy.h> > #include <linux/slab.h> > @@ -152,7 +153,7 @@ MODULE_DEVICE_TABLE(of, usb_xhci_of_match); > > static int xhci_plat_probe(struct platform_device *pdev) > { > - const struct of_device_id *match; > + const struct xhci_plat_priv *priv_match; > const struct hc_driver *driver; > struct device *sysdev; > struct xhci_hcd *xhci; > @@ -238,9 +239,8 @@ static int xhci_plat_probe(struct platform_device *pdev) > } > > xhci = hcd_to_xhci(hcd); > - match = of_match_node(usb_xhci_of_match, pdev->dev.of_node); > - if (match) { > - const struct xhci_plat_priv *priv_match = match->data; > + priv_match = of_device_get_match_data(&pdev->dev); > + if (priv_match) { > struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); > > /* Just copy data for now */ kbuild just spit out the following warning for this patch: drivers/usb/host/max3421-hcd.c:1707:2-8: preceding lock on line 1702 Error ids grouped by kconfigs: recent_errors └── i386-allmodconfig └── drivers-usb-host-max3421-hcd.c:preceding-lock-on-line I don't really know what it means, any ideas? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html