[PATCH 2/9] PM / Domains: Remove dev->driver check for runtime PM
Kevin Hilman
khilman at kernel.org
Wed Aug 12 12:50:39 PDT 2015
Lina Iyer <lina.iyer at linaro.org> writes:
> Remove check for driver of a device, for runtime PM. Device may be
> suspended without an explicit driver. This check seems to be vestigial
> and incorrect in the current context.
This one should probably have been RFC.
For a little more context here, this was uncovered when experimenting
with using runtime PM for CPU devices which don't have a dev->driver.
This check might have made sense before PM domains, but with PM domains,
it's entirely possible to have a simple device without a driver and the
PM domain handles all the necesary PM, so I think this check
could/should be removed.
Thoughts?
Kevin
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
> Signed-off-by: Kevin Hilman <khilman at linaro.org>
> Signed-off-by: Lina Iyer <lina.iyer at linaro.org>
> ---
> drivers/base/power/domain.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 5fd1306..ef8d19f 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -394,8 +394,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
> if (stat > PM_QOS_FLAGS_NONE)
> return -EBUSY;
>
> - if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev)
> - || pdd->dev->power.irq_safe))
> + if (!pm_runtime_suspended(pdd->dev) || pdd->dev->power.irq_safe)
> not_suspended++;
> }
More information about the linux-arm-kernel
mailing list