PM / Domains: Make device removal more straightforward
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 1 May 2012 19:33:53 +0000 (21:33 +0200)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 23 Jul 2012 08:35:03 +0000 (13:35 +0530)
commit14f8f00a366346b75b0271852edb2228f8903761
tree138e58bfd6b7aff02dd794b750482b94ed5c451c
parente950685ff48ebde68111bbcca5d5b8d3508f1296
PM / Domains: Make device removal more straightforward

The removal of a device from a PM domain doesn't have to browse
the domain's device list, because it can check directly if the
device belongs to the given domain.  Moreover, it should clear
the domain_data pointer in dev->power.subsys_data, because
dev_pm_put_subsys_data(dev) may not remove dev->power.subsys_data
and the stale domain data pointer may cause problems to happen.

Rework pm_genpd_remove_device() taking the above observations into
account.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/domain.c