Commit fd07eb09 authored by Russell King's avatar Russell King

[ARM] Convert list_for_each()/list_entry() to list_for_each_entry()

parent 2ad5451b
...@@ -153,12 +153,10 @@ static void queue_event_one_user(struct apm_user *as, apm_event_t event) ...@@ -153,12 +153,10 @@ static void queue_event_one_user(struct apm_user *as, apm_event_t event)
static void queue_event(apm_event_t event, struct apm_user *sender) static void queue_event(apm_event_t event, struct apm_user *sender)
{ {
struct list_head *l; struct apm_user *as;
spin_lock(&user_list_lock); spin_lock(&user_list_lock);
list_for_each(l, &apm_user_list) { list_for_each_entry(as, &apm_user_list, list) {
struct apm_user *as = list_entry(l, struct apm_user, list);
if (as != sender && as->reader) if (as != sender && as->reader)
queue_event_one_user(as, event); queue_event_one_user(as, event);
} }
...@@ -168,7 +166,7 @@ static void queue_event(apm_event_t event, struct apm_user *sender) ...@@ -168,7 +166,7 @@ static void queue_event(apm_event_t event, struct apm_user *sender)
static int apm_suspend(void) static int apm_suspend(void)
{ {
struct list_head *l; struct apm_user *as;
int err = pm_suspend(PM_SUSPEND_MEM); int err = pm_suspend(PM_SUSPEND_MEM);
/* /*
...@@ -181,9 +179,7 @@ static int apm_suspend(void) ...@@ -181,9 +179,7 @@ static int apm_suspend(void)
* Finally, wake up anyone who is sleeping on the suspend. * Finally, wake up anyone who is sleeping on the suspend.
*/ */
spin_lock(&user_list_lock); spin_lock(&user_list_lock);
list_for_each(l, &apm_user_list) { list_for_each_entry(as, &apm_user_list, list) {
struct apm_user *as = list_entry(l, struct apm_user, list);
as->suspend_result = err; as->suspend_result = err;
as->suspend_wait = 0; as->suspend_wait = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment