From 0c06090c9472db0525cb6fe229c3bea33bbbbb3c Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Fri, 18 Jul 2008 11:41:17 +0000 Subject: [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 --- drivers/watchdog/at32ap700x_wdt.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'drivers/watchdog/at32ap700x_wdt.c') diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index c5dc5e912fb..4538b57f451 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, int __user *p = argp; switch (cmd) { - case WDIOC_KEEPALIVE: - at32_wdt_pat(); - ret = 0; - break; case WDIOC_GETSUPPORT: ret = copy_to_user(argp, &at32_wdt_info, sizeof(at32_wdt_info)) ? -EFAULT : 0; break; - case WDIOC_SETTIMEOUT: - ret = get_user(time, p); - if (ret) - break; - ret = at32_wdt_settimeout(time); - if (ret) - break; - /* Enable new time value */ - at32_wdt_start(); - /* fall through */ - case WDIOC_GETTIMEOUT: - ret = put_user(wdt->timeout, p); - break; case WDIOC_GETSTATUS: ret = put_user(0, p); break; @@ -258,6 +241,23 @@ static long at32_wdt_ioctl(struct file *file, at32_wdt_start(); ret = 0; break; + case WDIOC_KEEPALIVE: + at32_wdt_pat(); + ret = 0; + break; + case WDIOC_SETTIMEOUT: + ret = get_user(time, p); + if (ret) + break; + ret = at32_wdt_settimeout(time); + if (ret) + break; + /* Enable new time value */ + at32_wdt_start(); + /* fall through */ + case WDIOC_GETTIMEOUT: + ret = put_user(wdt->timeout, p); + break; } return ret; -- cgit v1.2.3