X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fsa1100_wdt.c;h=016245419fadb17eda3646152ab507ae1057440f;hb=4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff;hp=ee1caae4d33b0683fe7e13501493eb933078b745;hpb=b933453f1965c1e3136cb5fd69abd6e6927fb5d7;p=karo-tx-linux.git diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index ee1caae4d33b..016245419fad 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c @@ -38,7 +38,7 @@ static unsigned long oscr_freq; static unsigned long sa1100wdt_users; -static int pre_margin; +static unsigned int pre_margin; static int boot_status; /* @@ -84,6 +84,7 @@ static const struct watchdog_info ident = { .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, .identity = "SA1100/PXA255 Watchdog", + .firmware_version = 1, }; static long sa1100dog_ioctl(struct file *file, unsigned int cmd, @@ -118,7 +119,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd, if (ret) break; - if (time <= 0 || time > 255) { + if (time <= 0 || (oscr_freq * (long long)time >= 0xffffffff)) { ret = -EINVAL; break; }