PM / Domains: Use the base device for driver_deferred_probe_check_state()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 25 Apr 2019 09:04:10 +0000 (11:04 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 25 Apr 2019 21:18:03 +0000 (23:18 +0200)
commit51dcf7482f4b3166ef477d44181648110d501d25
treec8b5a497272233836c58ba1953cab67b958feda4
parent40aa4db6d530e2ea71e00765df77ac78477e8348
PM / Domains: Use the base device for driver_deferred_probe_check_state()

When genpd fails to attach a device to one of its multiple PM domains,
we end up calling driver_deferred_probe_check_state() for the recently
allocated virtual device. This is incorrect, as it's the base device
that is being probed.

Fix this by passing along the base device to __genpd_dev_pm_attach()
and use that instead.

Fixes: e01afc325025 ("PM / Domains: Stop deferring probe at the end of initcall")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c