aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sbc60xxwdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2008-07-18 07:41:17 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-08-06 09:21:09 -0400
commit0c06090c9472db0525cb6fe229c3bea33bbbbb3c (patch)
treeb01c21f6ef5649b6f0071dee4a55cb3ba236a7b8 /drivers/watchdog/sbc60xxwdt.c
parent5eb82498e3a6da8a979c48945e3c1a85c10ccc25 (diff)
[WATCHDOG] Coding style - Indentation - part 2
This brings the watchdog drivers into line with coding style. This patch takes cares of the indentation as described in chapter 1. Main changes: * Re-structure the ioctl switch call for all drivers as follows: switch (cmd) { case WDIOC_GETSUPPORT: case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: case WDIOC_GETTEMP: case WDIOC_SETOPTIONS: case WDIOC_KEEPALIVE: case WDIOC_SETTIMEOUT: case WDIOC_GETTIMEOUT: case WDIOC_GETTIMELEFT: default: } This to make the migration from the drivers to the uniform watchdog device driver easier in the future. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/sbc60xxwdt.c')
-rw-r--r--drivers/watchdog/sbc60xxwdt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c
index e284a5d4fb1b..e801cd46c647 100644
--- a/drivers/watchdog/sbc60xxwdt.c
+++ b/drivers/watchdog/sbc60xxwdt.c
@@ -237,16 +237,11 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
237 }; 237 };
238 238
239 switch (cmd) { 239 switch (cmd) {
240 default:
241 return -ENOTTY;
242 case WDIOC_GETSUPPORT: 240 case WDIOC_GETSUPPORT:
243 return copy_to_user(argp, &ident, sizeof(ident))? -EFAULT : 0; 241 return copy_to_user(argp, &ident, sizeof(ident))? -EFAULT : 0;
244 case WDIOC_GETSTATUS: 242 case WDIOC_GETSTATUS:
245 case WDIOC_GETBOOTSTATUS: 243 case WDIOC_GETBOOTSTATUS:
246 return put_user(0, p); 244 return put_user(0, p);
247 case WDIOC_KEEPALIVE:
248 wdt_keepalive();
249 return 0;
250 case WDIOC_SETOPTIONS: 245 case WDIOC_SETOPTIONS:
251 { 246 {
252 int new_options, retval = -EINVAL; 247 int new_options, retval = -EINVAL;
@@ -262,6 +257,9 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
262 } 257 }
263 return retval; 258 return retval;
264 } 259 }
260 case WDIOC_KEEPALIVE:
261 wdt_keepalive();
262 return 0;
265 case WDIOC_SETTIMEOUT: 263 case WDIOC_SETTIMEOUT:
266 { 264 {
267 int new_timeout; 265 int new_timeout;
@@ -277,6 +275,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
277 } 275 }
278 case WDIOC_GETTIMEOUT: 276 case WDIOC_GETTIMEOUT:
279 return put_user(timeout, p); 277 return put_user(timeout, p);
278 default:
279 return -ENOTTY;
280 } 280 }
281} 281}
282 282