Skip to content

Commit c04e6e9

Browse files
pH5gregkh
authored andcommitted
gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
commit 503fe87bd0a8346ba9d8b7f49115dcd0a4185226 upstream. If of_node is set before calling platform_device_add, the driver core will try to use of: modalias matching, which fails because the device tree nodes don't have a compatible property set. This patch fixes imx-ipuv3-crtc module autoloading by setting the of_node property only after the platform modalias is set. Fixes: 304e6be ("gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports") Reported-by: Dennis Gilmore <dennis@ausil.us> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-By: Dennis Gilmore <dennis@ausil.us> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6e9544f commit c04e6e9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/ipu-v3/ipu-common.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,6 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
10681068
goto err_register;
10691069
}
10701070

1071-
pdev->dev.of_node = of_node;
10721071
pdev->dev.parent = dev;
10731072

10741073
ret = platform_device_add_data(pdev, &reg->pdata,
@@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
10791078
platform_device_put(pdev);
10801079
goto err_register;
10811080
}
1081+
1082+
/*
1083+
* Set of_node only after calling platform_device_add. Otherwise
1084+
* the platform:imx-ipuv3-crtc modalias won't be used.
1085+
*/
1086+
pdev->dev.of_node = of_node;
10821087
}
10831088

10841089
return 0;

0 commit comments

Comments
 (0)