aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
authorIan Campbell <icampbell@arcom.com>2005-11-07 05:21:24 -0500
committerWim Van Sebroeck <wim@iguana.be>2006-02-12 06:58:17 -0500
commit3a69e5791379a7c7d23c531a7679428300bb5072 (patch)
treea97274af65a6d3fe40fab98e2e56be0816a968e2 /drivers/char/watchdog
parentbc6d7fdf460ec5292d66bb551dbfa49ca682bebf (diff)
[WATCHDOG] sa1100_wdt.c sparse clean (2)
The following makes drivers/char/watchdog/sa1100_wdt.c sparse clean. (similar to the other watchdog drivers) Signed-off-by: Ian Campbell <icampbell@arcom.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r--drivers/char/watchdog/sa1100_wdt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c
index b474ea52d6e8..522a9370db94 100644
--- a/drivers/char/watchdog/sa1100_wdt.c
+++ b/drivers/char/watchdog/sa1100_wdt.c
@@ -93,23 +93,25 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file,
93{ 93{
94 int ret = -ENOIOCTLCMD; 94 int ret = -ENOIOCTLCMD;
95 int time; 95 int time;
96 void __user *argp = (void __user *)arg;
97 int __user *p = argp;
96 98
97 switch (cmd) { 99 switch (cmd) {
98 case WDIOC_GETSUPPORT: 100 case WDIOC_GETSUPPORT:
99 ret = copy_to_user((struct watchdog_info __user *)arg, &ident, 101 ret = copy_to_user(argp, &ident,
100 sizeof(ident)) ? -EFAULT : 0; 102 sizeof(ident)) ? -EFAULT : 0;
101 break; 103 break;
102 104
103 case WDIOC_GETSTATUS: 105 case WDIOC_GETSTATUS:
104 ret = put_user(0, (int __user *)arg); 106 ret = put_user(0, p);
105 break; 107 break;
106 108
107 case WDIOC_GETBOOTSTATUS: 109 case WDIOC_GETBOOTSTATUS:
108 ret = put_user(boot_status, (int __user *)arg); 110 ret = put_user(boot_status, p);
109 break; 111 break;
110 112
111 case WDIOC_SETTIMEOUT: 113 case WDIOC_SETTIMEOUT:
112 ret = get_user(time, (int __user *)arg); 114 ret = get_user(time, p);
113 if (ret) 115 if (ret)
114 break; 116 break;
115 117
@@ -123,7 +125,7 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file,
123 /*fall through*/ 125 /*fall through*/
124 126
125 case WDIOC_GETTIMEOUT: 127 case WDIOC_GETTIMEOUT:
126 ret = put_user(pre_margin / OSCR_FREQ, (int __user *)arg); 128 ret = put_user(pre_margin / OSCR_FREQ, p);
127 break; 129 break;
128 130
129 case WDIOC_KEEPALIVE: 131 case WDIOC_KEEPALIVE: