Skip to content

Commit

Permalink
PM / Runtime: Fix typo in status comparison causing warning
Browse files Browse the repository at this point in the history
GCC version 4.5.1 gives the following warning:

drivers/base/power/runtime.c: In function ‘rpm_check_suspend_allowed’:
drivers/base/power/runtime.c:146:25: warning: comparison between ‘enum dpm_state’ and ‘enum rpm_status’

which seems to be a typo in that dev->power.runtime_status
should be compared instead of dev->power.status.

Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Kevin Winchester authored and Rafael J. Wysocki committed Oct 29, 2010
1 parent 18cb657 commit 78ca7c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/power/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static int rpm_check_suspend_allowed(struct device *dev)

/* Pending resume requests take precedence over suspends. */
else if ((dev->power.deferred_resume
&& dev->power.status == RPM_SUSPENDING)
&& dev->power.runtime_status == RPM_SUSPENDING)
|| (dev->power.request_pending
&& dev->power.request == RPM_REQ_RESUME))
retval = -EAGAIN;
Expand Down

0 comments on commit 78ca7c3

Please sign in to comment.