aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/heartbeat.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/heartbeat.c')
-rw-r--r--arch/sh/drivers/heartbeat.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index bc59cb6cd78b..23dd6080422f 100644
--- a/arch/sh/drivers/heartbeat.c
+++ b/arch/sh/drivers/heartbeat.c
@@ -40,16 +40,9 @@ static void heartbeat_timer(unsigned long data)
40 static unsigned bit = 0, up = 1; 40 static unsigned bit = 0, up = 1;
41 41
42 ctrl_outw(1 << hd->bit_pos[bit], (unsigned long)hd->base); 42 ctrl_outw(1 << hd->bit_pos[bit], (unsigned long)hd->base);
43 if (up) 43 bit += up;
44 if (bit == (ARRAY_SIZE(hd->bit_pos) - 1)) { 44 if ((bit == 0) || (bit == ARRAY_SIZE(hd->bit_pos)-1))
45 bit--; 45 up = -up;
46 up = 0;
47 } else
48 bit++;
49 else if (bit == 0)
50 up = 1;
51 else
52 bit--;
53 46
54 mod_timer(&hd->timer, jiffies + (110 - ((300 << FSHIFT) / 47 mod_timer(&hd->timer, jiffies + (110 - ((300 << FSHIFT) /
55 ((avenrun[0] / 5) + (3 << FSHIFT))))); 48 ((avenrun[0] / 5) + (3 << FSHIFT)))));