diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2016-04-10 21:53:47 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-12 13:05:20 +0200 |
commit | c796d1d97c3035cf54d4d5a9e75abd094db80e76 (patch) | |
tree | d20729e4de03e9b5826a53cd5e357c24b88863d7 /drivers | |
parent | powerpc: sparse: Include headers for __weak symbols (diff) | |
download | linux-c796d1d97c3035cf54d4d5a9e75abd094db80e76.tar.xz linux-c796d1d97c3035cf54d4d5a9e75abd094db80e76.zip |
drivers: macintosh: rack-meter: limit idle ticks to total ticks
Limit idle ticks to total ticks. This prevents the annoying rackmeter
leds fully ON / OFF blinking state that happens on fully idling
G5 Xserve systems.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/rack-meter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index caaec654d7ea..ba7e330640fb 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -227,6 +227,7 @@ static void rackmeter_do_timer(struct work_struct *work) total_idle_ticks = get_cpu_idle_time(cpu); idle_ticks = (unsigned int) (total_idle_ticks - rcpu->prev_idle); + idle_ticks = min(idle_ticks, total_ticks); rcpu->prev_idle = total_idle_ticks; /* We do a very dumb calculation to update the LEDs for now, |