Re: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume

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

 



On Sun, Nov 08, 2020 at 07:21:15PM -0800, Randy Dunlap wrote:
> Add stubs for pm_clk_runtime_suspend() and pm_clk_runtime_resume()
> to fix build errors when CONFIG_PM and CONFIG_PM_CLK are not enabled.
> 
> Fixes these build errors:
> 
> ../drivers/clk/qcom/camcc-sc7180.c: In function ‘cam_cc_sc7180_probe’:
> ../drivers/clk/qcom/camcc-sc7180.c:1672:8: error: implicit declaration of function ‘pm_clk_runtime_resume’; did you mean ‘pm_runtime_resume’? [-Werror=implicit-function-declaration]
>   ret = pm_clk_runtime_resume(&pdev->dev);
>         ^~~~~~~~~~~~~~~~~~~~~
> ../drivers/clk/qcom/camcc-sc7180.c:1681:3: error: implicit declaration of function ‘pm_clk_runtime_suspend’; did you mean ‘pm_runtime_suspend’? [-Werror=implicit-function-declaration]
>    pm_clk_runtime_suspend(&pdev->dev);
>    ^~~~~~~~~~~~~~~~~~~~~~
> 
> Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
> Cc: Len Brown <len.brown@xxxxxxxxx>
> Cc: Pavel Machek <pavel@xxxxxx>
> Cc: linux-pm@xxxxxxxxxxxxxxx
> Cc: Michael Turquette <mturquette@xxxxxxxxxxxx>
> Cc: Stephen Boyd <sboyd@xxxxxxxxxx>
> Cc: linux-clk@xxxxxxxxxxxxxxx
> Cc: Taniya Das <tdas@xxxxxxxxxxxxxx>
> Cc: linux-next@xxxxxxxxxxxxxxx
> Cc: Nathan Chancellor <natechancellor@xxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

Build-tested-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
Reviewed-by: Nathan Chancellor <natechancellor@xxxxxxxxx>

> ---
> v2: move the function stubs to be inside the #else (for !CONFIG_PM)
>     as suggested by Nathan to fix another build error
> 
>  include/linux/pm_clock.h |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> --- linux-next-20201106.orig/include/linux/pm_clock.h
> +++ linux-next-20201106/include/linux/pm_clock.h
> @@ -27,6 +27,14 @@ extern int pm_clk_runtime_resume(struct
>  	.runtime_resume = pm_clk_runtime_resume,
>  #else
>  #define USE_PM_CLK_RUNTIME_OPS
> +static inline int pm_clk_runtime_suspend(struct device *dev)
> +{
> +	return 0;
> +}
> +static inline int pm_clk_runtime_resume(struct device *dev)
> +{
> +	return 0;
> +}
>  #endif
>  
>  #ifdef CONFIG_PM_CLK



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux