Re: [PATCH] media: i2c: imx290: care CONFIG_PM

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

 



Hello Morimoto-san,

Thank you for the patch.

On Wed, Mar 15, 2023 at 11:38:08PM +0000, Kuninori Morimoto wrote:
> It is using SET_RUNTIME_PM_OPS(), thus we need to care about CONFIG_PM.
> Otherwise, we will get below error without it.
> 
> ${Linux}/drivers/media/i2c/imx290.c:1090:12: error:\
>  'imx290_runtime_suspend' defined but not used [-Werror=unused-function]
>  1090 | static int imx290_runtime_suspend(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~~~~~
> ${Linux}/drivers/media/i2c/imx290.c:1082:12: error: \
>  'imx290_runtime_resume' defined but not used [-Werror=unused-function]
>  1082 | static int imx290_runtime_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Arnd has sent a patch to fix the same issue already, see
https://lore.kernel.org/linux-media/20230207161316.293923-1-arnd@xxxxxxxxxx.
It has been merged in the fixes branch of Sakari's tree, I expect it to
hit v6.3 soon.

> ---
>  drivers/media/i2c/imx290.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index 49d6c8bdec41..5f15b51dfdd3 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -1079,6 +1079,7 @@ static void imx290_power_off(struct imx290 *imx290)
>  	regulator_bulk_disable(ARRAY_SIZE(imx290->supplies), imx290->supplies);
>  }
>  
> +#ifdef CONFIG_PM
>  static int imx290_runtime_resume(struct device *dev)
>  {
>  	struct v4l2_subdev *sd = dev_get_drvdata(dev);
> @@ -1096,6 +1097,7 @@ static int imx290_runtime_suspend(struct device *dev)
>  
>  	return 0;
>  }
> +#endif
>  
>  static const struct dev_pm_ops imx290_pm_ops = {
>  	SET_RUNTIME_PM_OPS(imx290_runtime_suspend, imx290_runtime_resume, NULL)

-- 
Regards,

Laurent Pinchart



[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