* [PATCH] clk: renesas: Use pm_clk_no_clocks() helper i.s.o. direct access
@ 2017-04-25 17:33 Geert Uytterhoeven
2017-04-26 7:11 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-04-25 17:33 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-pm, linux-renesas-soc, Geert Uytterhoeven
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>
---
To be queued up in clk-renesas-for-v4.13.
drivers/clk/renesas/clk-mstp.c | 2 +-
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 4067216bf31fbce9..f1617dd044cbbe15 100644
--- a/drivers/clk/renesas/clk-mstp.c
+++ b/drivers/clk/renesas/clk-mstp.c
@@ -325,7 +325,7 @@ int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev)
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 99eeec6f24ec6c6b..38a01406740dfc04 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -477,7 +477,7 @@ int cpg_mssr_attach_dev(struct generic_pm_domain *unused, struct device *dev)
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);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: renesas: Use pm_clk_no_clocks() helper i.s.o. direct access
2017-04-25 17:33 [PATCH] clk: renesas: Use pm_clk_no_clocks() helper i.s.o. direct access Geert Uytterhoeven
@ 2017-04-26 7:11 ` Simon Horman
2017-05-11 9:00 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2017-04-26 7:11 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-pm, linux-renesas-soc
On Tue, Apr 25, 2017 at 07:33:58PM +0200, Geert Uytterhoeven wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: renesas: Use pm_clk_no_clocks() helper i.s.o. direct access
2017-04-26 7:11 ` Simon Horman
@ 2017-05-11 9:00 ` Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-05-11 9:00 UTC (permalink / raw)
To: Simon Horman
Cc: Geert Uytterhoeven, Michael Turquette, Stephen Boyd, linux-clk,
Linux PM list, Linux-Renesas
On Wed, Apr 26, 2017 at 9:11 AM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Apr 25, 2017 at 07:33:58PM +0200, Geert Uytterhoeven wrote:
>> 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>
Thanks, queued in clk-renesas-for-v4.13.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-11 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 17:33 [PATCH] clk: renesas: Use pm_clk_no_clocks() helper i.s.o. direct access Geert Uytterhoeven
2017-04-26 7:11 ` Simon Horman
2017-05-11 9:00 ` Geert Uytterhoeven
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.