aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/geodewdt.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/geodewdt.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/geodewdt.c')
-rw-r--r--drivers/watchdog/geodewdt.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c
index 74c00698801d..04b861cfdf0c 100644
--- a/drivers/watchdog/geodewdt.c
+++ b/drivers/watchdog/geodewdt.c
@@ -159,22 +159,6 @@ geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
159 case WDIOC_GETBOOTSTATUS: 159 case WDIOC_GETBOOTSTATUS:
160 return put_user(0, p); 160 return put_user(0, p);
161 161
162 case WDIOC_KEEPALIVE:
163 geodewdt_ping();
164 return 0;
165
166 case WDIOC_SETTIMEOUT:
167 if (get_user(interval, p))
168 return -EFAULT;
169
170 if (geodewdt_set_heartbeat(interval))
171 return -EINVAL;
172
173/* Fall through */
174
175 case WDIOC_GETTIMEOUT:
176 return put_user(timeout, p);
177
178 case WDIOC_SETOPTIONS: 162 case WDIOC_SETOPTIONS:
179 { 163 {
180 int options, ret = -EINVAL; 164 int options, ret = -EINVAL;
@@ -194,6 +178,20 @@ geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
194 178
195 return ret; 179 return ret;
196 } 180 }
181 case WDIOC_KEEPALIVE:
182 geodewdt_ping();
183 return 0;
184
185 case WDIOC_SETTIMEOUT:
186 if (get_user(interval, p))
187 return -EFAULT;
188
189 if (geodewdt_set_heartbeat(interval))
190 return -EINVAL;
191 /* Fall through */
192 case WDIOC_GETTIMEOUT:
193 return put_user(timeout, p);
194
197 default: 195 default:
198 return -ENOTTY; 196 return -ENOTTY;
199 } 197 }