diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-02-08 19:08:44 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-05-15 09:46:31 +0200 |
commit | e05e853e2c254baf4ce11870dca81dee58b5d2d0 (patch) | |
tree | 371ef411fc06dca139212467fbe17a1af5ed3954 /drivers/clk/renesas | |
parent | clk: renesas: Do not build clk-div6 for R8A7792 (diff) | |
download | linux-e05e853e2c254baf4ce11870dca81dee58b5d2d0.tar.xz linux-e05e853e2c254baf4ce11870dca81dee58b5d2d0.zip |
clk: renesas: Use pm_clk_no_clocks() helper i.s.o. direct access
The pm_subsys_data.clock_list member exists only if CONFIG_PM_CLK=y.
Hence direct accesses to this field break compile-testing on platforms
where CONFIG_PM_CLK=n.
To fix this, use the pm_clk_no_clocks() helper instead, for which a
dummy version is provided if CONFIG_PM_CLK=n.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'drivers/clk/renesas')
-rw-r--r-- | drivers/clk/renesas/clk-mstp.c | 2 | ||||
-rw-r--r-- | drivers/clk/renesas/renesas-cpg-mssr.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/renesas/clk-mstp.c b/drivers/clk/renesas/clk-mstp.c index 4067216bf31f..f1617dd044cb 100644 --- a/drivers/clk/renesas/clk-mstp.c +++ b/drivers/clk/renesas/clk-mstp.c @@ -325,7 +325,7 @@ fail_put: void cpg_mstp_detach_dev(struct generic_pm_domain *unused, struct device *dev) { - if (!list_empty(&dev->power.subsys_data->clock_list)) + if (!pm_clk_no_clocks(dev)) pm_clk_destroy(dev); } diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c index 99eeec6f24ec..38a01406740d 100644 --- a/drivers/clk/renesas/renesas-cpg-mssr.c +++ b/drivers/clk/renesas/renesas-cpg-mssr.c @@ -477,7 +477,7 @@ fail_put: void cpg_mssr_detach_dev(struct generic_pm_domain *unused, struct device *dev) { - if (!list_empty(&dev->power.subsys_data->clock_list)) + if (!pm_clk_no_clocks(dev)) pm_clk_destroy(dev); } |