mirror of
https://github.com/schoebel/mars
synced 2025-03-11 07:47:41 +00:00
main: further reduce brick list traversals
This commit is contained in:
parent
19d20567fd
commit
bef8f30ab1
@ -6353,10 +6353,6 @@ static int _main_thread(void *data)
|
||||
}
|
||||
MARS_DBG("kill any bricks (when possible) = %d\n", status);
|
||||
|
||||
status = mars_kill_brick_when_possible(mars_global,
|
||||
NULL, false);
|
||||
MARS_DBG("kill main bricks (when possible) = %d\n", status);
|
||||
|
||||
if ((long long)jiffies + mars_rollover_interval * HZ >= last_rollover) {
|
||||
last_rollover = jiffies;
|
||||
rollover_all();
|
||||
|
@ -2673,7 +2673,9 @@ restart:
|
||||
}
|
||||
this_type = type_list[index++];
|
||||
}
|
||||
if (!matches)
|
||||
/* also kill any non-working bricks */
|
||||
if (!matches &&
|
||||
(brick->power.button || !brick->power.led_off))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user