]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Add device domain data reference counter
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 5 Jul 2012 20:12:32 +0000 (22:12 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Thu, 5 Jul 2012 20:12:32 +0000 (22:12 +0200)
commitd5f3fc0e71c88397de255765a8fa0bcf8364cad4
tree907136239832a60a2f7af6e6dd442fdc3ac0f034
parent0dc877cb564555b99dcf0f2d1dd6d656af7932b2
PM / Domains: Add device domain data reference counter

Add a mechanism for counting references to the
struct generic_pm_domain_data object pointed to by
dev->power.subsys_data->domain_data if the device in question
belongs to a generic PM domain.

This change is necessary for a subsequent patch making it possible to
allocate that object from within pm_genpd_add_callbacks(), so that
drivers can attach their PM domain device callbacks to devices before
those devices are added to PM domains.

This patch has been tested on the SH7372 Mackerel board.

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