light: fix re-computation of todo_primary

This commit is contained in:
Thomas Schoebel-Theuer 2013-01-24 11:12:16 +01:00
parent 94e28913b1
commit 79f7e6acd3
1 changed files with 1 additions and 5 deletions

View File

@ -2804,11 +2804,6 @@ int make_primary(void *buf, struct mars_dent *dent)
struct mars_rotate *rot;
int status = -EINVAL;
if (!global->global_power.button) {
status = 0;
goto done;
}
parent = dent->d_parent;
CHECK_PTR(parent, done);
rot = parent->d_private;
@ -2820,6 +2815,7 @@ int make_primary(void *buf, struct mars_dent *dent)
global->global_power.button && dent->new_link && !strcmp(dent->new_link, my_id());
rot->is_primary =
rot->if_brick && !rot->if_brick->power.led_off;
MARS_DBG("todo_primary = %d is_primary = %d\n", rot->todo_primary, rot->is_primary);
status = 0;
done: