Skip to content

Commit

Permalink
clk: samsung: mark PM functions as __maybe_unused
Browse files Browse the repository at this point in the history
The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume
functions are now unused when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function]
  219 | static int exynos_clkout_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function]
  210 | static int exynos_clkout_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the otherwise harmless warning.

Fixes: 9484f2c ("clk: samsung: exynos-clkout: convert to module driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20201204091616.4128366-1-arnd@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
  • Loading branch information
Arnd Bergmann authored and Krzysztof Kozlowski committed Dec 5, 2020
1 parent 3b4c362 commit 4c44274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clk/samsung/clk-exynos-clkout.c
Original file line number Diff line number Diff line change
@@ -207,7 +207,7 @@ static int exynos_clkout_remove(struct platform_device *pdev)
return 0;
}

static int exynos_clkout_suspend(struct device *dev)
static int __maybe_unused exynos_clkout_suspend(struct device *dev)
{
struct exynos_clkout *clkout = dev_get_drvdata(dev);

@@ -216,7 +216,7 @@ static int exynos_clkout_suspend(struct device *dev)
return 0;
}

static int exynos_clkout_resume(struct device *dev)
static int __maybe_unused exynos_clkout_resume(struct device *dev)
{
struct exynos_clkout *clkout = dev_get_drvdata(dev);

0 comments on commit 4c44274

Please sign in to comment.