aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2007-07-21 09:42:18 -0400
committerWim Van Sebroeck <wim@iguana.be>2007-07-23 13:26:49 -0400
commit5c4eb61b375ce16fc7af5055d8ab7bc19e788361 (patch)
tree764284501cf9474b4dfe4b8cf1409cacc85669a4 /drivers/char
parentec9505a7ecadc0ab8f8e3c4c5fa900d57467e391 (diff)
[WATCHDOG] WDIOC_GETSTATUS and WDIOC_GETBOOTSTATUS clean-up
Add mandatory WDIOC_GETSTATUS and WDIOC_GETBOOTSTATUS ioctl's for drivers that don't have them yet. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/watchdog/cpu5wdt.c4
-rw-r--r--drivers/char/watchdog/machzwd.c1
-rw-r--r--drivers/char/watchdog/mixcomwd.c5
-rw-r--r--drivers/char/watchdog/mpc83xx_wdt.c3
-rw-r--r--drivers/char/watchdog/mtx-1_wdt.c1
5 files changed, 14 insertions, 0 deletions
diff --git a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c
index d0d45a8b09f0..20eb6c3e9853 100644
--- a/drivers/char/watchdog/cpu5wdt.c
+++ b/drivers/char/watchdog/cpu5wdt.c
@@ -162,6 +162,10 @@ static int cpu5wdt_ioctl(struct inode *inode, struct file *file, unsigned int cm
162 if ( copy_to_user(argp, &value, sizeof(int)) ) 162 if ( copy_to_user(argp, &value, sizeof(int)) )
163 return -EFAULT; 163 return -EFAULT;
164 break; 164 break;
165 case WDIOC_GETBOOTSTATUS:
166 if ( copy_to_user(argp, &value, sizeof(int)) )
167 retrun -EFAULT;
168 break;
165 case WDIOC_GETSUPPORT: 169 case WDIOC_GETSUPPORT:
166 if ( copy_to_user(argp, &ident, sizeof(ident)) ) 170 if ( copy_to_user(argp, &ident, sizeof(ident)) )
167 return -EFAULT; 171 return -EFAULT;
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
index a0d27160c80e..6d35bb112a5f 100644
--- a/drivers/char/watchdog/machzwd.c
+++ b/drivers/char/watchdog/machzwd.c
@@ -321,6 +321,7 @@ static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
321 break; 321 break;
322 322
323 case WDIOC_GETSTATUS: 323 case WDIOC_GETSTATUS:
324 case WDIOC_GETBOOTSTATUS:
324 return put_user(0, p); 325 return put_user(0, p);
325 326
326 case WDIOC_KEEPALIVE: 327 case WDIOC_KEEPALIVE:
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c
index db2ccb864412..1adf1d56027d 100644
--- a/drivers/char/watchdog/mixcomwd.c
+++ b/drivers/char/watchdog/mixcomwd.c
@@ -215,6 +215,11 @@ static int mixcomwd_ioctl(struct inode *inode, struct file *file,
215 return -EFAULT; 215 return -EFAULT;
216 } 216 }
217 break; 217 break;
218 case WDIOC_GETBOOTSTATUS:
219 if (copy_to_user(p, &status, sizeof(int))) {
220 return -EFAULT;
221 }
222 break;
218 case WDIOC_GETSUPPORT: 223 case WDIOC_GETSUPPORT:
219 if (copy_to_user(argp, &ident, sizeof(ident))) { 224 if (copy_to_user(argp, &ident, sizeof(ident))) {
220 return -EFAULT; 225 return -EFAULT;
diff --git a/drivers/char/watchdog/mpc83xx_wdt.c b/drivers/char/watchdog/mpc83xx_wdt.c
index 18ca752e2f90..a0bf95fb9763 100644
--- a/drivers/char/watchdog/mpc83xx_wdt.c
+++ b/drivers/char/watchdog/mpc83xx_wdt.c
@@ -119,6 +119,9 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
119 switch (cmd) { 119 switch (cmd) {
120 case WDIOC_GETSUPPORT: 120 case WDIOC_GETSUPPORT:
121 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; 121 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
122 case WDIOC_GETSTATUS:
123 case WDIOC_GETBOOTSTATUS:
124 return put_user(0, p);
122 case WDIOC_KEEPALIVE: 125 case WDIOC_KEEPALIVE:
123 mpc83xx_wdt_keepalive(); 126 mpc83xx_wdt_keepalive();
124 return 0; 127 return 0;
diff --git a/drivers/char/watchdog/mtx-1_wdt.c b/drivers/char/watchdog/mtx-1_wdt.c
index 419ab445c944..dcfd401a7ad7 100644
--- a/drivers/char/watchdog/mtx-1_wdt.c
+++ b/drivers/char/watchdog/mtx-1_wdt.c
@@ -143,6 +143,7 @@ static int mtx1_wdt_ioctl(struct inode *inode, struct file *file, unsigned int c
143 mtx1_wdt_reset(); 143 mtx1_wdt_reset();
144 break; 144 break;
145 case WDIOC_GETSTATUS: 145 case WDIOC_GETSTATUS:
146 case WDIOC_GETBOOTSTATUS:
146 if ( copy_to_user(argp, &value, sizeof(int)) ) 147 if ( copy_to_user(argp, &value, sizeof(int)) )
147 return -EFAULT; 148 return -EFAULT;
148 break; 149 break;