diff options
author | Denis Turischev <denis@compulab.co.il> | 2010-01-21 16:10:07 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-01-25 19:48:49 +0000 |
commit | ef39a1bf3c4fbdea085c618be424cc88b803f248 (patch) | |
tree | 44be93747836260b3fb2778cfe5830c2c467abe1 /drivers/watchdog/sbc_fitpc2_wdt.c | |
parent | e605d554ec17be55741b066387ae9f341777f52c (diff) |
[WATCHDOG] sbc_fitpc2_wdt: fix I/O space access technique.
The mdelay function was used between I/O access commands, that causes peak
in CPU usage. Fix it by substitution mdelay to msleep.
Expand usage on fitPC2 compatible boards according to DMI identification.
Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/sbc_fitpc2_wdt.c')
-rw-r--r-- | drivers/watchdog/sbc_fitpc2_wdt.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c index 91430a89107..e6763d2a567 100644 --- a/drivers/watchdog/sbc_fitpc2_wdt.c +++ b/drivers/watchdog/sbc_fitpc2_wdt.c @@ -46,9 +46,9 @@ static DEFINE_SPINLOCK(wdt_lock); static void wdt_send_data(unsigned char command, unsigned char data) { outb(command, COMMAND_PORT); - mdelay(100); + msleep(100); outb(data, DATA_PORT); - mdelay(200); + msleep(200); } static void wdt_enable(void) @@ -202,11 +202,10 @@ static int __init fitpc2_wdt_init(void) { int err; - if (strcmp("SBC-FITPC2", dmi_get_system_info(DMI_BOARD_NAME))) { - pr_info("board name is: %s. Should be SBC-FITPC2\n", - dmi_get_system_info(DMI_BOARD_NAME)); + if (!strstr(dmi_get_system_info(DMI_BOARD_NAME), "SBC-FITPC2")) return -ENODEV; - } + + pr_info("%s found\n", dmi_get_system_info(DMI_BOARD_NAME)); if (!request_region(COMMAND_PORT, 1, WATCHDOG_NAME)) { pr_err("I/O address 0x%04x already in use\n", COMMAND_PORT); |