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/w83627hf_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/w83627hf_wdt.c')
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index 70c843f4201a..59507f609996 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c | |||
@@ -211,18 +211,6 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
211 | case WDIOC_GETSTATUS: | 211 | case WDIOC_GETSTATUS: |
212 | case WDIOC_GETBOOTSTATUS: | 212 | case WDIOC_GETBOOTSTATUS: |
213 | return put_user(0, p); | 213 | return put_user(0, p); |
214 | case WDIOC_KEEPALIVE: | ||
215 | wdt_ping(); | ||
216 | break; | ||
217 | case WDIOC_SETTIMEOUT: | ||
218 | if (get_user(new_timeout, p)) | ||
219 | return -EFAULT; | ||
220 | if (wdt_set_heartbeat(new_timeout)) | ||
221 | return -EINVAL; | ||
222 | wdt_ping(); | ||
223 | /* Fall */ | ||
224 | case WDIOC_GETTIMEOUT: | ||
225 | return put_user(timeout, p); | ||
226 | case WDIOC_SETOPTIONS: | 214 | case WDIOC_SETOPTIONS: |
227 | { | 215 | { |
228 | int options, retval = -EINVAL; | 216 | int options, retval = -EINVAL; |
@@ -239,6 +227,18 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
239 | } | 227 | } |
240 | return retval; | 228 | return retval; |
241 | } | 229 | } |
230 | case WDIOC_KEEPALIVE: | ||
231 | wdt_ping(); | ||
232 | break; | ||
233 | case WDIOC_SETTIMEOUT: | ||
234 | if (get_user(new_timeout, p)) | ||
235 | return -EFAULT; | ||
236 | if (wdt_set_heartbeat(new_timeout)) | ||
237 | return -EINVAL; | ||
238 | wdt_ping(); | ||
239 | /* Fall */ | ||
240 | case WDIOC_GETTIMEOUT: | ||
241 | return put_user(timeout, p); | ||
242 | default: | 242 | default: |
243 | return -ENOTTY; | 243 | return -ENOTTY; |
244 | } | 244 | } |