Re: [PATCH 1/1] i2c: Fix pm_runtime_get_if_in_use() usage in sensor drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 30, 2018 at 9:12 PM Sakari Ailus
<sakari.ailus@xxxxxxxxxxxxxxx> wrote:
>
> pm_runtime_get_if_in_use() returns -EINVAL if runtime PM is disabled. This
> should not be considered an error. Generally the driver has enabled
> runtime PM already so getting this error due to runtime PM being disabled
> will not happen.
>
> Instead of checking for lesser or equal to zero, check for zero only.
> Address this for drivers where this pattern exists.
>
> This patch has been produced using the following command:
>
> $ git grep -l pm_runtime_get_if_in_use -- drivers/media/i2c/ | \
>   xargs perl -i -pe 's/(pm_runtime_get_if_in_use\(.*\)) \<\= 0/!$1/'
>
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> ---
>  drivers/media/i2c/ov13858.c | 2 +-
>  drivers/media/i2c/ov2685.c  | 2 +-
>  drivers/media/i2c/ov5670.c  | 2 +-
>  drivers/media/i2c/ov5695.c  | 2 +-
>  drivers/media/i2c/ov7740.c  | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)

Thanks!

Reviewed-by: Tomasz Figa <tfiga@xxxxxxxxxxxx>

Best regards,
Tomasz



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux