aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/at91rm9200_wdt.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/at91rm9200_wdt.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/at91rm9200_wdt.c')
-rw-r--r--drivers/watchdog/at91rm9200_wdt.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index bb79f649dc7e..2313f44144f8 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -137,23 +137,9 @@ static long at91_wdt_ioct(struct file *file,
137 int new_value; 137 int new_value;
138 138
139 switch (cmd) { 139 switch (cmd) {
140 case WDIOC_KEEPALIVE:
141 at91_wdt_reload(); /* pat the watchdog */
142 return 0;
143 case WDIOC_GETSUPPORT: 140 case WDIOC_GETSUPPORT:
144 return copy_to_user(argp, &at91_wdt_info, 141 return copy_to_user(argp, &at91_wdt_info,
145 sizeof(at91_wdt_info)) ? -EFAULT : 0; 142 sizeof(at91_wdt_info)) ? -EFAULT : 0;
146 case WDIOC_SETTIMEOUT:
147 if (get_user(new_value, p))
148 return -EFAULT;
149 if (at91_wdt_settimeout(new_value))
150 return -EINVAL;
151 /* Enable new time value */
152 at91_wdt_start();
153 /* Return current value */
154 return put_user(wdt_time, p);
155 case WDIOC_GETTIMEOUT:
156 return put_user(wdt_time, p);
157 case WDIOC_GETSTATUS: 143 case WDIOC_GETSTATUS:
158 case WDIOC_GETBOOTSTATUS: 144 case WDIOC_GETBOOTSTATUS:
159 return put_user(0, p); 145 return put_user(0, p);
@@ -165,6 +151,20 @@ static long at91_wdt_ioct(struct file *file,
165 if (new_value & WDIOS_ENABLECARD) 151 if (new_value & WDIOS_ENABLECARD)
166 at91_wdt_start(); 152 at91_wdt_start();
167 return 0; 153 return 0;
154 case WDIOC_KEEPALIVE:
155 at91_wdt_reload(); /* pat the watchdog */
156 return 0;
157 case WDIOC_SETTIMEOUT:
158 if (get_user(new_value, p))
159 return -EFAULT;
160 if (at91_wdt_settimeout(new_value))
161 return -EINVAL;
162 /* Enable new time value */
163 at91_wdt_start();
164 /* Return current value */
165 return put_user(wdt_time, p);
166 case WDIOC_GETTIMEOUT:
167 return put_user(wdt_time, p);
168 default: 168 default:
169 return -ENOTTY; 169 return -ENOTTY;
170 } 170 }