aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/advantechwdt.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/advantechwdt.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/advantechwdt.c')
-rw-r--r--drivers/watchdog/advantechwdt.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/watchdog/advantechwdt.c b/drivers/watchdog/advantechwdt.c
index e6bf8d2d3d30..bfec16600475 100644
--- a/drivers/watchdog/advantechwdt.c
+++ b/drivers/watchdog/advantechwdt.c
@@ -152,19 +152,6 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
152 case WDIOC_GETBOOTSTATUS: 152 case WDIOC_GETBOOTSTATUS:
153 return put_user(0, p); 153 return put_user(0, p);
154 154
155 case WDIOC_KEEPALIVE:
156 advwdt_ping();
157 break;
158
159 case WDIOC_SETTIMEOUT:
160 if (get_user(new_timeout, p))
161 return -EFAULT;
162 if (advwdt_set_heartbeat(new_timeout))
163 return -EINVAL;
164 advwdt_ping();
165 /* Fall */
166 case WDIOC_GETTIMEOUT:
167 return put_user(timeout, p);
168 case WDIOC_SETOPTIONS: 155 case WDIOC_SETOPTIONS:
169 { 156 {
170 int options, retval = -EINVAL; 157 int options, retval = -EINVAL;
@@ -181,6 +168,19 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
181 } 168 }
182 return retval; 169 return retval;
183 } 170 }
171 case WDIOC_KEEPALIVE:
172 advwdt_ping();
173 break;
174
175 case WDIOC_SETTIMEOUT:
176 if (get_user(new_timeout, p))
177 return -EFAULT;
178 if (advwdt_set_heartbeat(new_timeout))
179 return -EINVAL;
180 advwdt_ping();
181 /* Fall */
182 case WDIOC_GETTIMEOUT:
183 return put_user(timeout, p);
184 default: 184 default:
185 return -ENOTTY; 185 return -ENOTTY;
186 } 186 }