Skip to content

Commit b017500

Browse files
committed
PM: sleep: Use bool for all 1-bit fields in struct dev_pm_info
For some 1-bit fields in struct dev_pm_info the data type is bool, while for some other 1-bit fields in there it is unsigned int, and these differences are somewhat arbitrary. For consistency, change the data type of the latter to bool, so that all of the 1-bit fields in struct dev_pm_info fields are bool. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6613476 commit b017500

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

include/linux/pm.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ struct pm_subsys_data {
662662

663663
struct dev_pm_info {
664664
pm_message_t power_state;
665-
unsigned int can_wakeup:1;
666-
unsigned int async_suspend:1;
665+
bool can_wakeup:1;
666+
bool async_suspend:1;
667667
bool in_dpm_list:1; /* Owned by the PM core */
668668
bool is_prepared:1; /* Owned by the PM core */
669669
bool is_suspended:1; /* Ditto */
@@ -682,10 +682,10 @@ struct dev_pm_info {
682682
bool syscore:1;
683683
bool no_pm_callbacks:1; /* Owned by the PM core */
684684
bool async_in_progress:1; /* Owned by the PM core */
685-
unsigned int must_resume:1; /* Owned by the PM core */
686-
unsigned int may_skip_resume:1; /* Set by subsystems */
685+
bool must_resume:1; /* Owned by the PM core */
686+
bool may_skip_resume:1; /* Set by subsystems */
687687
#else
688-
unsigned int should_wakeup:1;
688+
bool should_wakeup:1;
689689
#endif
690690
#ifdef CONFIG_PM
691691
struct hrtimer suspend_timer;
@@ -696,17 +696,17 @@ struct dev_pm_info {
696696
atomic_t usage_count;
697697
atomic_t child_count;
698698
unsigned int disable_depth:3;
699-
unsigned int idle_notification:1;
700-
unsigned int request_pending:1;
701-
unsigned int deferred_resume:1;
702-
unsigned int needs_force_resume:1;
703-
unsigned int runtime_auto:1;
699+
bool idle_notification:1;
700+
bool request_pending:1;
701+
bool deferred_resume:1;
702+
bool needs_force_resume:1;
703+
bool runtime_auto:1;
704704
bool ignore_children:1;
705-
unsigned int no_callbacks:1;
706-
unsigned int irq_safe:1;
707-
unsigned int use_autosuspend:1;
708-
unsigned int timer_autosuspends:1;
709-
unsigned int memalloc_noio:1;
705+
bool no_callbacks:1;
706+
bool irq_safe:1;
707+
bool use_autosuspend:1;
708+
bool timer_autosuspends:1;
709+
bool memalloc_noio:1;
710710
unsigned int links_count;
711711
enum rpm_request request;
712712
enum rpm_status runtime_status;

0 commit comments

Comments
 (0)