diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2008-07-18 07:41:17 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2008-08-06 09:21:09 -0400 |
commit | 0c06090c9472db0525cb6fe229c3bea33bbbbb3c (patch) | |
tree | b01c21f6ef5649b6f0071dee4a55cb3ba236a7b8 /drivers/watchdog/bfin_wdt.c | |
parent | 5eb82498e3a6da8a979c48945e3c1a85c10ccc25 (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/bfin_wdt.c')
-rw-r--r-- | drivers/watchdog/bfin_wdt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c index 8f6e871b3fe3..31b42253054e 100644 --- a/drivers/watchdog/bfin_wdt.c +++ b/drivers/watchdog/bfin_wdt.c | |||
@@ -265,20 +265,6 @@ static long bfin_wdt_ioctl(struct file *file, | |||
265 | case WDIOC_GETSTATUS: | 265 | case WDIOC_GETSTATUS: |
266 | case WDIOC_GETBOOTSTATUS: | 266 | case WDIOC_GETBOOTSTATUS: |
267 | return put_user(!!(_bfin_swrst & SWRST_RESET_WDOG), p); | 267 | return put_user(!!(_bfin_swrst & SWRST_RESET_WDOG), p); |
268 | case WDIOC_KEEPALIVE: | ||
269 | bfin_wdt_keepalive(); | ||
270 | return 0; | ||
271 | case WDIOC_SETTIMEOUT: { | ||
272 | int new_timeout; | ||
273 | |||
274 | if (get_user(new_timeout, p)) | ||
275 | return -EFAULT; | ||
276 | if (bfin_wdt_set_timeout(new_timeout)) | ||
277 | return -EINVAL; | ||
278 | } | ||
279 | /* Fall */ | ||
280 | case WDIOC_GETTIMEOUT: | ||
281 | return put_user(timeout, p); | ||
282 | case WDIOC_SETOPTIONS: { | 268 | case WDIOC_SETOPTIONS: { |
283 | unsigned long flags; | 269 | unsigned long flags; |
284 | int options, ret = -EINVAL; | 270 | int options, ret = -EINVAL; |
@@ -298,6 +284,20 @@ static long bfin_wdt_ioctl(struct file *file, | |||
298 | spin_unlock_irqrestore(&bfin_wdt_spinlock, flags); | 284 | spin_unlock_irqrestore(&bfin_wdt_spinlock, flags); |
299 | return ret; | 285 | return ret; |
300 | } | 286 | } |
287 | case WDIOC_KEEPALIVE: | ||
288 | bfin_wdt_keepalive(); | ||
289 | return 0; | ||
290 | case WDIOC_SETTIMEOUT: { | ||
291 | int new_timeout; | ||
292 | |||
293 | if (get_user(new_timeout, p)) | ||
294 | return -EFAULT; | ||
295 | if (bfin_wdt_set_timeout(new_timeout)) | ||
296 | return -EINVAL; | ||
297 | } | ||
298 | /* Fall */ | ||
299 | case WDIOC_GETTIMEOUT: | ||
300 | return put_user(timeout, p); | ||
301 | default: | 301 | default: |
302 | return -ENOTTY; | 302 | return -ENOTTY; |
303 | } | 303 | } |