lkml.org 
[lkml]   [2016]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 55/67] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Philipp Zabel <p.zabel@pengutronix.de>

    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: 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>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/gpu/ipu-v3/ipu-common.c | 7 ++++++-
    1 file changed, 6 insertions(+), 1 deletion(-)

    --- 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
    goto err_register;
    }

    - pdev->dev.of_node = of_node;
    pdev->dev.parent = dev;

    ret = platform_device_add_data(pdev, &reg->pdata,
    @@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct
    platform_device_put(pdev);
    goto err_register;
    }
    +
    + /*
    + * Set of_node only after calling platform_device_add. Otherwise
    + * the platform:imx-ipuv3-crtc modalias won't be used.
    + */
    + pdev->dev.of_node = of_node;
    }

    return 0;

    \
     
     \ /
      Last update: 2016-05-09 09:41    [W:3.369 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site