lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 161/846] media: i2c: Re-order runtime pm initialisation
    Date
    From: Daniel Scally <djrscally@gmail.com>

    [ Upstream commit d2484fbf780762f6f9cc3abb7a07ee42dca2eaa3 ]

    The kerneldoc for pm_runtime_set_suspended() says:

    "It is not valid to call this function for devices with runtime PM
    enabled"

    To satisfy that requirement, re-order the calls so that
    pm_runtime_enable() is the last one.

    Fixes: 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor")
    Signed-off-by: Daniel Scally <djrscally@gmail.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/media/i2c/ov8865.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/media/i2c/ov8865.c
    +++ b/drivers/media/i2c/ov8865.c
    @@ -2899,8 +2899,8 @@ static int ov8865_probe(struct i2c_clien

    /* Runtime PM */

    - pm_runtime_enable(sensor->dev);
    pm_runtime_set_suspended(sensor->dev);
    + pm_runtime_enable(sensor->dev);

    /* V4L2 subdev register */


    \
     
     \ /
      Last update: 2022-01-24 22:09    [W:2.570 / U:0.788 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site