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/at32ap700x_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/at32ap700x_wdt.c')
-rw-r--r-- | drivers/watchdog/at32ap700x_wdt.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index c5dc5e912fb2..4538b57f451a 100644 --- a/drivers/watchdog/at32ap700x_wdt.c +++ b/drivers/watchdog/at32ap700x_wdt.c | |||
@@ -221,27 +221,10 @@ static long at32_wdt_ioctl(struct file *file, | |||
221 | int __user *p = argp; | 221 | int __user *p = argp; |
222 | 222 | ||
223 | switch (cmd) { | 223 | switch (cmd) { |
224 | case WDIOC_KEEPALIVE: | ||
225 | at32_wdt_pat(); | ||
226 | ret = 0; | ||
227 | break; | ||
228 | case WDIOC_GETSUPPORT: | 224 | case WDIOC_GETSUPPORT: |
229 | ret = copy_to_user(argp, &at32_wdt_info, | 225 | ret = copy_to_user(argp, &at32_wdt_info, |
230 | sizeof(at32_wdt_info)) ? -EFAULT : 0; | 226 | sizeof(at32_wdt_info)) ? -EFAULT : 0; |
231 | break; | 227 | break; |
232 | case WDIOC_SETTIMEOUT: | ||
233 | ret = get_user(time, p); | ||
234 | if (ret) | ||
235 | break; | ||
236 | ret = at32_wdt_settimeout(time); | ||
237 | if (ret) | ||
238 | break; | ||
239 | /* Enable new time value */ | ||
240 | at32_wdt_start(); | ||
241 | /* fall through */ | ||
242 | case WDIOC_GETTIMEOUT: | ||
243 | ret = put_user(wdt->timeout, p); | ||
244 | break; | ||
245 | case WDIOC_GETSTATUS: | 228 | case WDIOC_GETSTATUS: |
246 | ret = put_user(0, p); | 229 | ret = put_user(0, p); |
247 | break; | 230 | break; |
@@ -258,6 +241,23 @@ static long at32_wdt_ioctl(struct file *file, | |||
258 | at32_wdt_start(); | 241 | at32_wdt_start(); |
259 | ret = 0; | 242 | ret = 0; |
260 | break; | 243 | break; |
244 | case WDIOC_KEEPALIVE: | ||
245 | at32_wdt_pat(); | ||
246 | ret = 0; | ||
247 | break; | ||
248 | case WDIOC_SETTIMEOUT: | ||
249 | ret = get_user(time, p); | ||
250 | if (ret) | ||
251 | break; | ||
252 | ret = at32_wdt_settimeout(time); | ||
253 | if (ret) | ||
254 | break; | ||
255 | /* Enable new time value */ | ||
256 | at32_wdt_start(); | ||
257 | /* fall through */ | ||
258 | case WDIOC_GETTIMEOUT: | ||
259 | ret = put_user(wdt->timeout, p); | ||
260 | break; | ||
261 | } | 261 | } |
262 | 262 | ||
263 | return ret; | 263 | return ret; |