Miquel Raynal 2447883934 clk: core: clarify the check for runtime PM
Currently, the core->dev entry is populated only if runtime PM is
enabled. Doing so prevents accessing the device structure in any
case.

Keep the same logic but instead of using the presence of core->dev as
the only condition, also check the status of
pm_runtime_enabled(). Then, we can set the core->dev pointer at any
time as long as a device structure is available.

This change will help supporting device links in the clock subsystem.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Chen-Yu Tsai <wens@csie.org>
[sboyd@kernel.org: Change to a boolean flag]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2019-03-01 11:17:16 -08:00
..
2019-01-24 10:55:32 -08:00
2017-11-01 23:25:43 -07:00
2018-11-06 09:41:57 -08:00
2018-03-16 15:53:30 -07:00
2018-12-10 14:43:20 -08:00
2018-12-11 09:57:47 -08:00
2018-12-11 09:57:47 -08:00
2018-12-11 09:57:47 -08:00
2018-12-11 09:57:48 -08:00
2018-12-11 09:57:48 -08:00
2018-07-06 13:44:06 -07:00
2018-12-11 09:57:48 -08:00
2018-11-08 10:29:44 -08:00
2017-11-01 23:25:51 -07:00