diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-06-21 21:13:38 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2018-08-02 12:09:11 +0200 |
commit | 2d87e6c1b99c402360fdfe19ce4f579ab2f96adf (patch) | |
tree | 6884e0ca4ddaacc2c17ceb8a5cb3945a95afa9b4 /drivers/gpu/ipu-v3 | |
parent | 9f0ba3d92fe63fa72f88238d9dde47a38a7d8f40 (diff) |
gpu: ipu-v3: default to id 0 on missing OF alias
This is better than storing -ENODEV in the id number. This fixes SoCs
with only one IPU that don't specify an IPU alias in the device tree.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 48685cddbad1..c73bd003f845 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1401,6 +1401,8 @@ static int ipu_probe(struct platform_device *pdev) return -ENODEV; ipu->id = of_alias_get_id(np, "ipu"); + if (ipu->id < 0) + ipu->id = 0; if (of_device_is_compatible(np, "fsl,imx6qp-ipu") && IS_ENABLED(CONFIG_DRM)) { |