summaryrefslogtreecommitdiff
path: root/drivers/watchdog/kempld_wdt.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-01 09:39:46 +0400
committerWim Van Sebroeck <wim@iguana.be>2013-11-17 22:34:39 +0400
commitb3970bdebbb2901becca7cb82e44b5c5976f0fae (patch)
treec52e705a21410b5455fc0960e16590812f8c309d /drivers/watchdog/kempld_wdt.c
parent60295507f6abf47a40d1fd758cd4401e7193f16e (diff)
downloadlinux-b3970bdebbb2901becca7cb82e44b5c5976f0fae.tar.xz
watchdog: kempld_wdt: Add __user annotation
Added __user annotation to fix the following sparse warnings. Also, it makes 'kempld_prescaler' static because it is used only in this file. drivers/watchdog/kempld_wdt.c:70:11: warning: symbol 'kempld_prescaler' was not declared. Should it be static? drivers/watchdog/kempld_wdt.c:364:23: warning: incorrect type in initializer (different address spaces) drivers/watchdog/kempld_wdt.c:364:23: expected int const [noderef] <asn:1>*register __p drivers/watchdog/kempld_wdt.c:364:23: got int *<noident> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/kempld_wdt.c')
-rw-r--r--drivers/watchdog/kempld_wdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/kempld_wdt.c b/drivers/watchdog/kempld_wdt.c
index 5c3d4df63e68..8a8e3eca8aea 100644
--- a/drivers/watchdog/kempld_wdt.c
+++ b/drivers/watchdog/kempld_wdt.c
@@ -67,7 +67,7 @@ enum {
PRESCALER_12,
};
-const u32 kempld_prescaler[] = {
+static const u32 kempld_prescaler[] = {
[PRESCALER_21] = (1 << 21) - 1,
[PRESCALER_17] = (1 << 17) - 1,
[PRESCALER_12] = (1 << 12) - 1,
@@ -361,7 +361,7 @@ static long kempld_wdt_ioctl(struct watchdog_device *wdd, unsigned int cmd,
ret = kempld_wdt_keepalive(wdd);
break;
case WDIOC_GETPRETIMEOUT:
- ret = put_user(wdt_data->pretimeout, (int *)arg);
+ ret = put_user(wdt_data->pretimeout, (int __user *)arg);
break;
}