lkml.org 
[lkml]   [2018]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.14 19/89] gpu: ipu-v3: default to id 0 on missing OF alias
    Date
    From: Philipp Zabel <p.zabel@pengutronix.de>

    [ Upstream commit 2d87e6c1b99c402360fdfe19ce4f579ab2f96adf ]

    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>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    ---
    drivers/gpu/ipu-v3/ipu-common.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
    index 658fa2d3e40c..2c8411b8d050 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)) {
    --
    2.17.1
    \
     
     \ /
      Last update: 2018-09-02 15:26    [W:2.532 / U:0.356 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site