usb: musb: sunxi: propagate devicetree node to glue pdev
authorMans Rullgard <mans@mansr.com>
Wed, 15 Jan 2020 13:25:24 +0000 (07:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2020 13:46:54 +0000 (14:46 +0100)
In order for devicetree nodes to be correctly associated with attached
devices, the controller node needs to be propagated to the glue device.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200115132547.364-3-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/sunxi.c

index 832a41f..a72665f 100644 (file)
@@ -781,6 +781,8 @@ static int sunxi_musb_probe(struct platform_device *pdev)
        pinfo.name       = "musb-hdrc";
        pinfo.id        = PLATFORM_DEVID_AUTO;
        pinfo.parent    = &pdev->dev;
+       pinfo.fwnode    = of_fwnode_handle(pdev->dev.of_node);
+       pinfo.of_node_reused = true;
        pinfo.res       = pdev->resource;
        pinfo.num_res   = pdev->num_resources;
        pinfo.data      = &pdata;