aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wafer5823wdt.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/wafer5823wdt.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/wafer5823wdt.c')
-rw-r--r--drivers/watchdog/wafer5823wdt.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c
index 886cbbcf3eed..44e81f7d4322 100644
--- a/drivers/watchdog/wafer5823wdt.c
+++ b/drivers/watchdog/wafer5823wdt.c
@@ -145,22 +145,6 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd,
145 case WDIOC_GETBOOTSTATUS: 145 case WDIOC_GETBOOTSTATUS:
146 return put_user(0, p); 146 return put_user(0, p);
147 147
148 case WDIOC_KEEPALIVE:
149 wafwdt_ping();
150 break;
151
152 case WDIOC_SETTIMEOUT:
153 if (get_user(new_timeout, p))
154 return -EFAULT;
155 if ((new_timeout < 1) || (new_timeout > 255))
156 return -EINVAL;
157 timeout = new_timeout;
158 wafwdt_stop();
159 wafwdt_start();
160 /* Fall */
161 case WDIOC_GETTIMEOUT:
162 return put_user(timeout, p);
163
164 case WDIOC_SETOPTIONS: 148 case WDIOC_SETOPTIONS:
165 { 149 {
166 int options, retval = -EINVAL; 150 int options, retval = -EINVAL;
@@ -181,6 +165,22 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd,
181 return retval; 165 return retval;
182 } 166 }
183 167
168 case WDIOC_KEEPALIVE:
169 wafwdt_ping();
170 break;
171
172 case WDIOC_SETTIMEOUT:
173 if (get_user(new_timeout, p))
174 return -EFAULT;
175 if ((new_timeout < 1) || (new_timeout > 255))
176 return -EINVAL;
177 timeout = new_timeout;
178 wafwdt_stop();
179 wafwdt_start();
180 /* Fall */
181 case WDIOC_GETTIMEOUT:
182 return put_user(timeout, p);
183
184 default: 184 default:
185 return -ENOTTY; 185 return -ENOTTY;
186 } 186 }