diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-02-09 09:24:53 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-11 02:19:47 -0500 |
commit | 6819bc2e1e46c71711a8dddf4040e706b02973c0 (patch) | |
tree | 6baa6c808fd70a01d5e95c77b02d0a6c5409cc9e /net/irda/ircomm/ircomm_tty_ioctl.c | |
parent | 981c0ff6900c981668a798fe9e0bc5ba32ee3fd4 (diff) |
[NET] IRDA: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/ircomm/ircomm_tty_ioctl.c')
-rw-r--r-- | net/irda/ircomm/ircomm_tty_ioctl.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c index 75e39ea599d..a5174e6e7ad 100644 --- a/net/irda/ircomm/ircomm_tty_ioctl.c +++ b/net/irda/ircomm/ircomm_tty_ioctl.c | |||
@@ -1,31 +1,31 @@ | |||
1 | /********************************************************************* | 1 | /********************************************************************* |
2 | * | 2 | * |
3 | * Filename: ircomm_tty_ioctl.c | 3 | * Filename: ircomm_tty_ioctl.c |
4 | * Version: | 4 | * Version: |
5 | * Description: | 5 | * Description: |
6 | * Status: Experimental. | 6 | * Status: Experimental. |
7 | * Author: Dag Brattli <dagb@cs.uit.no> | 7 | * Author: Dag Brattli <dagb@cs.uit.no> |
8 | * Created at: Thu Jun 10 14:39:09 1999 | 8 | * Created at: Thu Jun 10 14:39:09 1999 |
9 | * Modified at: Wed Jan 5 14:45:43 2000 | 9 | * Modified at: Wed Jan 5 14:45:43 2000 |
10 | * Modified by: Dag Brattli <dagb@cs.uit.no> | 10 | * Modified by: Dag Brattli <dagb@cs.uit.no> |
11 | * | 11 | * |
12 | * Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved. | 12 | * Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved. |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License as | 15 | * modify it under the terms of the GNU General Public License as |
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * This program is distributed in the hope that it will be useful, | 19 | * This program is distributed in the hope that it will be useful, |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22 | * GNU General Public License for more details. | 22 | * GNU General Public License for more details. |
23 | * | 23 | * |
24 | * You should have received a copy of the GNU General Public License | 24 | * You should have received a copy of the GNU General Public License |
25 | * along with this program; if not, write to the Free Software | 25 | * along with this program; if not, write to the Free Software |
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
27 | * MA 02111-1307 USA | 27 | * MA 02111-1307 USA |
28 | * | 28 | * |
29 | ********************************************************************/ | 29 | ********************************************************************/ |
30 | 30 | ||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -75,7 +75,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
75 | } | 75 | } |
76 | if (cflag & CSTOPB) | 76 | if (cflag & CSTOPB) |
77 | cval |= IRCOMM_2_STOP_BIT; | 77 | cval |= IRCOMM_2_STOP_BIT; |
78 | 78 | ||
79 | if (cflag & PARENB) | 79 | if (cflag & PARENB) |
80 | cval |= IRCOMM_PARITY_ENABLE; | 80 | cval |= IRCOMM_PARITY_ENABLE; |
81 | if (!(cflag & PARODD)) | 81 | if (!(cflag & PARODD)) |
@@ -88,7 +88,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
88 | 88 | ||
89 | self->settings.data_rate = baud; | 89 | self->settings.data_rate = baud; |
90 | ircomm_param_request(self, IRCOMM_DATA_RATE, FALSE); | 90 | ircomm_param_request(self, IRCOMM_DATA_RATE, FALSE); |
91 | 91 | ||
92 | /* CTS flow control flag and modem status interrupts */ | 92 | /* CTS flow control flag and modem status interrupts */ |
93 | if (cflag & CRTSCTS) { | 93 | if (cflag & CRTSCTS) { |
94 | self->flags |= ASYNC_CTS_FLOW; | 94 | self->flags |= ASYNC_CTS_FLOW; |
@@ -104,7 +104,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
104 | self->flags &= ~ASYNC_CHECK_CD; | 104 | self->flags &= ~ASYNC_CHECK_CD; |
105 | else | 105 | else |
106 | self->flags |= ASYNC_CHECK_CD; | 106 | self->flags |= ASYNC_CHECK_CD; |
107 | #if 0 | 107 | #if 0 |
108 | /* | 108 | /* |
109 | * Set up parity check flag | 109 | * Set up parity check flag |
110 | */ | 110 | */ |
@@ -113,7 +113,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
113 | driver->read_status_mask |= LSR_FE | LSR_PE; | 113 | driver->read_status_mask |= LSR_FE | LSR_PE; |
114 | if (I_BRKINT(driver->tty) || I_PARMRK(driver->tty)) | 114 | if (I_BRKINT(driver->tty) || I_PARMRK(driver->tty)) |
115 | driver->read_status_mask |= LSR_BI; | 115 | driver->read_status_mask |= LSR_BI; |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * Characters to ignore | 118 | * Characters to ignore |
119 | */ | 119 | */ |
@@ -124,17 +124,17 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
124 | if (I_IGNBRK(self->tty)) { | 124 | if (I_IGNBRK(self->tty)) { |
125 | self->ignore_status_mask |= LSR_BI; | 125 | self->ignore_status_mask |= LSR_BI; |
126 | /* | 126 | /* |
127 | * If we're ignore parity and break indicators, ignore | 127 | * If we're ignore parity and break indicators, ignore |
128 | * overruns too. (For real raw support). | 128 | * overruns too. (For real raw support). |
129 | */ | 129 | */ |
130 | if (I_IGNPAR(self->tty)) | 130 | if (I_IGNPAR(self->tty)) |
131 | self->ignore_status_mask |= LSR_OE; | 131 | self->ignore_status_mask |= LSR_OE; |
132 | } | 132 | } |
133 | #endif | 133 | #endif |
134 | self->settings.data_format = cval; | 134 | self->settings.data_format = cval; |
135 | 135 | ||
136 | ircomm_param_request(self, IRCOMM_DATA_FORMAT, FALSE); | 136 | ircomm_param_request(self, IRCOMM_DATA_FORMAT, FALSE); |
137 | ircomm_param_request(self, IRCOMM_FLOW_CONTROL, TRUE); | 137 | ircomm_param_request(self, IRCOMM_FLOW_CONTROL, TRUE); |
138 | } | 138 | } |
139 | 139 | ||
140 | /* | 140 | /* |
@@ -145,7 +145,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
145 | * should be prepared to accept the case where old == NULL, and try to | 145 | * should be prepared to accept the case where old == NULL, and try to |
146 | * do something rational. | 146 | * do something rational. |
147 | */ | 147 | */ |
148 | void ircomm_tty_set_termios(struct tty_struct *tty, | 148 | void ircomm_tty_set_termios(struct tty_struct *tty, |
149 | struct ktermios *old_termios) | 149 | struct ktermios *old_termios) |
150 | { | 150 | { |
151 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 151 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
@@ -153,8 +153,8 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
153 | 153 | ||
154 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 154 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); |
155 | 155 | ||
156 | if ((cflag == old_termios->c_cflag) && | 156 | if ((cflag == old_termios->c_cflag) && |
157 | (RELEVANT_IFLAG(tty->termios->c_iflag) == | 157 | (RELEVANT_IFLAG(tty->termios->c_iflag) == |
158 | RELEVANT_IFLAG(old_termios->c_iflag))) | 158 | RELEVANT_IFLAG(old_termios->c_iflag))) |
159 | { | 159 | { |
160 | return; | 160 | return; |
@@ -168,21 +168,21 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
168 | self->settings.dte &= ~(IRCOMM_DTR|IRCOMM_RTS); | 168 | self->settings.dte &= ~(IRCOMM_DTR|IRCOMM_RTS); |
169 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 169 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
170 | } | 170 | } |
171 | 171 | ||
172 | /* Handle transition away from B0 status */ | 172 | /* Handle transition away from B0 status */ |
173 | if (!(old_termios->c_cflag & CBAUD) && | 173 | if (!(old_termios->c_cflag & CBAUD) && |
174 | (cflag & CBAUD)) { | 174 | (cflag & CBAUD)) { |
175 | self->settings.dte |= IRCOMM_DTR; | 175 | self->settings.dte |= IRCOMM_DTR; |
176 | if (!(tty->termios->c_cflag & CRTSCTS) || | 176 | if (!(tty->termios->c_cflag & CRTSCTS) || |
177 | !test_bit(TTY_THROTTLED, &tty->flags)) { | 177 | !test_bit(TTY_THROTTLED, &tty->flags)) { |
178 | self->settings.dte |= IRCOMM_RTS; | 178 | self->settings.dte |= IRCOMM_RTS; |
179 | } | 179 | } |
180 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 180 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
181 | } | 181 | } |
182 | 182 | ||
183 | /* Handle turning off CRTSCTS */ | 183 | /* Handle turning off CRTSCTS */ |
184 | if ((old_termios->c_cflag & CRTSCTS) && | 184 | if ((old_termios->c_cflag & CRTSCTS) && |
185 | !(tty->termios->c_cflag & CRTSCTS)) | 185 | !(tty->termios->c_cflag & CRTSCTS)) |
186 | { | 186 | { |
187 | tty->hw_stopped = 0; | 187 | tty->hw_stopped = 0; |
188 | ircomm_tty_start(tty); | 188 | ircomm_tty_start(tty); |
@@ -192,7 +192,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
192 | /* | 192 | /* |
193 | * Function ircomm_tty_tiocmget (tty, file) | 193 | * Function ircomm_tty_tiocmget (tty, file) |
194 | * | 194 | * |
195 | * | 195 | * |
196 | * | 196 | * |
197 | */ | 197 | */ |
198 | int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file) | 198 | int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file) |
@@ -217,12 +217,12 @@ int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file) | |||
217 | /* | 217 | /* |
218 | * Function ircomm_tty_tiocmset (tty, file, set, clear) | 218 | * Function ircomm_tty_tiocmset (tty, file, set, clear) |
219 | * | 219 | * |
220 | * | 220 | * |
221 | * | 221 | * |
222 | */ | 222 | */ |
223 | int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file, | 223 | int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file, |
224 | unsigned int set, unsigned int clear) | 224 | unsigned int set, unsigned int clear) |
225 | { | 225 | { |
226 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 226 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
227 | 227 | ||
228 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 228 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); |
@@ -249,21 +249,21 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file, | |||
249 | self->settings.dte |= IRCOMM_DELTA_DTR; | 249 | self->settings.dte |= IRCOMM_DELTA_DTR; |
250 | 250 | ||
251 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 251 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
252 | 252 | ||
253 | return 0; | 253 | return 0; |
254 | } | 254 | } |
255 | 255 | ||
256 | /* | 256 | /* |
257 | * Function get_serial_info (driver, retinfo) | 257 | * Function get_serial_info (driver, retinfo) |
258 | * | 258 | * |
259 | * | 259 | * |
260 | * | 260 | * |
261 | */ | 261 | */ |
262 | static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, | 262 | static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, |
263 | struct serial_struct __user *retinfo) | 263 | struct serial_struct __user *retinfo) |
264 | { | 264 | { |
265 | struct serial_struct info; | 265 | struct serial_struct info; |
266 | 266 | ||
267 | if (!retinfo) | 267 | if (!retinfo) |
268 | return -EFAULT; | 268 | return -EFAULT; |
269 | 269 | ||
@@ -277,11 +277,11 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, | |||
277 | info.closing_wait = self->closing_wait; | 277 | info.closing_wait = self->closing_wait; |
278 | 278 | ||
279 | /* For compatibility */ | 279 | /* For compatibility */ |
280 | info.type = PORT_16550A; | 280 | info.type = PORT_16550A; |
281 | info.port = 0; | 281 | info.port = 0; |
282 | info.irq = 0; | 282 | info.irq = 0; |
283 | info.xmit_fifo_size = 0; | 283 | info.xmit_fifo_size = 0; |
284 | info.hub6 = 0; | 284 | info.hub6 = 0; |
285 | info.custom_divisor = 0; | 285 | info.custom_divisor = 0; |
286 | 286 | ||
287 | if (copy_to_user(retinfo, &info, sizeof(*retinfo))) | 287 | if (copy_to_user(retinfo, &info, sizeof(*retinfo))) |
@@ -293,7 +293,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, | |||
293 | /* | 293 | /* |
294 | * Function set_serial_info (driver, new_info) | 294 | * Function set_serial_info (driver, new_info) |
295 | * | 295 | * |
296 | * | 296 | * |
297 | * | 297 | * |
298 | */ | 298 | */ |
299 | static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, | 299 | static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, |
@@ -311,7 +311,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, | |||
311 | 311 | ||
312 | state = self | 312 | state = self |
313 | old_state = *self; | 313 | old_state = *self; |
314 | 314 | ||
315 | if (!capable(CAP_SYS_ADMIN)) { | 315 | if (!capable(CAP_SYS_ADMIN)) { |
316 | if ((new_serial.baud_base != state->settings.data_rate) || | 316 | if ((new_serial.baud_base != state->settings.data_rate) || |
317 | (new_serial.close_delay != state->close_delay) || | 317 | (new_serial.close_delay != state->close_delay) || |
@@ -368,10 +368,10 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, | |||
368 | /* | 368 | /* |
369 | * Function ircomm_tty_ioctl (tty, file, cmd, arg) | 369 | * Function ircomm_tty_ioctl (tty, file, cmd, arg) |
370 | * | 370 | * |
371 | * | 371 | * |
372 | * | 372 | * |
373 | */ | 373 | */ |
374 | int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, | 374 | int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, |
375 | unsigned int cmd, unsigned long arg) | 375 | unsigned int cmd, unsigned long arg) |
376 | { | 376 | { |
377 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 377 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
@@ -416,7 +416,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
416 | put_user(cnow.brk, &p_cuser->brk) || | 416 | put_user(cnow.brk, &p_cuser->brk) || |
417 | put_user(cnow.buf_overrun, &p_cuser->buf_overrun)) | 417 | put_user(cnow.buf_overrun, &p_cuser->buf_overrun)) |
418 | return -EFAULT; | 418 | return -EFAULT; |
419 | #endif | 419 | #endif |
420 | return 0; | 420 | return 0; |
421 | default: | 421 | default: |
422 | ret = -ENOIOCTLCMD; /* ioctls which we must ignore */ | 422 | ret = -ENOIOCTLCMD; /* ioctls which we must ignore */ |