PM / Domains: Use power.sybsys_data to reduce overhead
Currently pm_genpd_runtime_resume() has to walk the list of devices from the device's PM domain to find the corresponding device list object containing the need_restore field to check if the driver's .runtime_resume() callback should be executed for the device. This is suboptimal and can be simplified by using power.sybsys_data to store device information used by the generic PM domains code. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
@@ -258,6 +258,12 @@ struct pm_clk_notifier_block {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_CLK
|
||||
static inline bool pm_clk_no_clocks(struct device *dev)
|
||||
{
|
||||
return dev && dev->power.subsys_data
|
||||
&& list_empty(&dev->power.subsys_data->clock_list);
|
||||
}
|
||||
|
||||
extern void pm_clk_init(struct device *dev);
|
||||
extern int pm_clk_create(struct device *dev);
|
||||
extern void pm_clk_destroy(struct device *dev);
|
||||
@@ -266,6 +272,10 @@ extern void pm_clk_remove(struct device *dev, const char *con_id);
|
||||
extern int pm_clk_suspend(struct device *dev);
|
||||
extern int pm_clk_resume(struct device *dev);
|
||||
#else
|
||||
static inline bool pm_clk_no_clocks(struct device *dev)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
static inline void pm_clk_init(struct device *dev)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user