diff options
| author | Philipp Zabel <p.zabel@pengutronix.de> | 2016-04-27 04:17:51 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-05-04 20:34:52 -0400 |
| commit | 503fe87bd0a8346ba9d8b7f49115dcd0a4185226 (patch) | |
| tree | cc9499b79a1805dc27b9de902d0a341524946f1d /drivers/gpu | |
| parent | 4810d9682971e8eee659f96e4f9d9154e3c6c0b4 (diff) | |
gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
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: 304e6be652e2 ("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>
Cc: stable@vger.kernel.org # 4.4+
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/ipu-v3/ipu-common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index e00db3f510dd..abb98c77bad2 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c | |||
| @@ -1068,7 +1068,6 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) | |||
| 1068 | goto err_register; | 1068 | goto err_register; |
| 1069 | } | 1069 | } |
| 1070 | 1070 | ||
| 1071 | pdev->dev.of_node = of_node; | ||
| 1072 | pdev->dev.parent = dev; | 1071 | pdev->dev.parent = dev; |
| 1073 | 1072 | ||
| 1074 | ret = platform_device_add_data(pdev, ®->pdata, | 1073 | ret = platform_device_add_data(pdev, ®->pdata, |
| @@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) | |||
| 1079 | platform_device_put(pdev); | 1078 | platform_device_put(pdev); |
| 1080 | goto err_register; | 1079 | goto err_register; |
| 1081 | } | 1080 | } |
| 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; | ||
| 1082 | } | 1087 | } |
| 1083 | 1088 | ||
| 1084 | return 0; | 1089 | return 0; |
