diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-25 09:33:50 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-25 09:33:50 -0400 |
commit | 5c095a0e0d600d5a5a4207eaadabd18db46395ce (patch) | |
tree | 18163d773234898e71c22d83b265a1eccfba11d9 /include/linux/pm.h | |
parent | 111058c3ff29a6a25216b31789046c2a330baa7d (diff) |
PM: Introduce struct pm_subsys_data
Introduce struct pm_subsys_data that may be subclassed by subsystems
to store subsystem-specific information related to the device. Move
the clock management fields accessed through the power.subsys_data
pointer in struct device to the new strucutre.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r-- | include/linux/pm.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index f7c84c9abd30..bf5ee37388d4 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -421,6 +421,13 @@ enum rpm_request { | |||
421 | 421 | ||
422 | struct wakeup_source; | 422 | struct wakeup_source; |
423 | 423 | ||
424 | struct pm_subsys_data { | ||
425 | spinlock_t lock; | ||
426 | #ifdef CONFIG_PM_CLK | ||
427 | struct list_head clock_list; | ||
428 | #endif | ||
429 | }; | ||
430 | |||
424 | struct dev_pm_info { | 431 | struct dev_pm_info { |
425 | pm_message_t power_state; | 432 | pm_message_t power_state; |
426 | unsigned int can_wakeup:1; | 433 | unsigned int can_wakeup:1; |
@@ -462,7 +469,7 @@ struct dev_pm_info { | |||
462 | unsigned long suspended_jiffies; | 469 | unsigned long suspended_jiffies; |
463 | unsigned long accounting_timestamp; | 470 | unsigned long accounting_timestamp; |
464 | #endif | 471 | #endif |
465 | void *subsys_data; /* Owned by the subsystem. */ | 472 | struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */ |
466 | }; | 473 | }; |
467 | 474 | ||
468 | extern void update_pm_runtime_accounting(struct device *dev); | 475 | extern void update_pm_runtime_accounting(struct device *dev); |