aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm/tty.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:33 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:20 -0500
commit8e87d14255acffeee36873de226dc25c11b5f46d (patch)
treee11c179c8db4ae3ad56ea02d583bc041dcc686b6 /net/bluetooth/rfcomm/tty.c
parent528930b91ee89a05a6264629cf99109652c19ca8 (diff)
[NET] BLUETOOTH: 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/bluetooth/rfcomm/tty.c')
-rw-r--r--net/bluetooth/rfcomm/tty.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index eb2b52484c70..8cd82dce5008 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -1,4 +1,4 @@
1/* 1/*
2 RFCOMM implementation for Linux Bluetooth stack (BlueZ). 2 RFCOMM implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com> 3 Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org> 4 Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>
@@ -11,13 +11,13 @@
11 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 11 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 12 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
13 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY 13 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
14 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 14 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
15 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 18
19 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 19 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
20 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 20 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
21 SOFTWARE IS DISCLAIMED. 21 SOFTWARE IS DISCLAIMED.
22*/ 22*/
23 23
@@ -110,7 +110,7 @@ static void rfcomm_dev_destruct(struct rfcomm_dev *dev)
110 110
111 kfree(dev); 111 kfree(dev);
112 112
113 /* It's safe to call module_put() here because socket still 113 /* It's safe to call module_put() here because socket still
114 holds reference to this module. */ 114 holds reference to this module. */
115 module_put(THIS_MODULE); 115 module_put(THIS_MODULE);
116} 116}
@@ -185,7 +185,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
185 int err = 0; 185 int err = 0;
186 186
187 BT_DBG("id %d channel %d", req->dev_id, req->channel); 187 BT_DBG("id %d channel %d", req->dev_id, req->channel);
188 188
189 dev = kzalloc(sizeof(struct rfcomm_dev), GFP_KERNEL); 189 dev = kzalloc(sizeof(struct rfcomm_dev), GFP_KERNEL);
190 if (!dev) 190 if (!dev)
191 return -ENOMEM; 191 return -ENOMEM;
@@ -234,7 +234,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
234 bacpy(&dev->dst, &req->dst); 234 bacpy(&dev->dst, &req->dst);
235 dev->channel = req->channel; 235 dev->channel = req->channel;
236 236
237 dev->flags = req->flags & 237 dev->flags = req->flags &
238 ((1 << RFCOMM_RELEASE_ONHUP) | (1 << RFCOMM_REUSE_DLC)); 238 ((1 << RFCOMM_RELEASE_ONHUP) | (1 << RFCOMM_REUSE_DLC));
239 239
240 init_waitqueue_head(&dev->wait); 240 init_waitqueue_head(&dev->wait);
@@ -249,7 +249,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
249 dev->dlc = dlc; 249 dev->dlc = dlc;
250 rfcomm_dlc_unlock(dlc); 250 rfcomm_dlc_unlock(dlc);
251 251
252 /* It's safe to call __module_get() here because socket already 252 /* It's safe to call __module_get() here because socket already
253 holds reference to this module. */ 253 holds reference to this module. */
254 __module_get(THIS_MODULE); 254 __module_get(THIS_MODULE);
255 255
@@ -487,7 +487,7 @@ static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb)
487{ 487{
488 struct rfcomm_dev *dev = dlc->owner; 488 struct rfcomm_dev *dev = dlc->owner;
489 struct tty_struct *tty; 489 struct tty_struct *tty;
490 490
491 if (!dev || !(tty = dev->tty)) { 491 if (!dev || !(tty = dev->tty)) {
492 kfree_skb(skb); 492 kfree_skb(skb);
493 return; 493 return;
@@ -506,7 +506,7 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
506 struct rfcomm_dev *dev = dlc->owner; 506 struct rfcomm_dev *dev = dlc->owner;
507 if (!dev) 507 if (!dev)
508 return; 508 return;
509 509
510 BT_DBG("dlc %p dev %p err %d", dlc, dev, err); 510 BT_DBG("dlc %p dev %p err %d", dlc, dev, err);
511 511
512 dev->err = err; 512 dev->err = err;
@@ -525,7 +525,7 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
525 rfcomm_dev_put(dev); 525 rfcomm_dev_put(dev);
526 rfcomm_dlc_lock(dlc); 526 rfcomm_dlc_lock(dlc);
527 } 527 }
528 } else 528 } else
529 tty_hangup(dev->tty); 529 tty_hangup(dev->tty);
530 } 530 }
531} 531}
@@ -543,7 +543,7 @@ static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
543 tty_hangup(dev->tty); 543 tty_hangup(dev->tty);
544 } 544 }
545 545
546 dev->modem_status = 546 dev->modem_status =
547 ((v24_sig & RFCOMM_V24_RTC) ? (TIOCM_DSR | TIOCM_DTR) : 0) | 547 ((v24_sig & RFCOMM_V24_RTC) ? (TIOCM_DSR | TIOCM_DTR) : 0) |
548 ((v24_sig & RFCOMM_V24_RTR) ? (TIOCM_RTS | TIOCM_CTS) : 0) | 548 ((v24_sig & RFCOMM_V24_RTR) ? (TIOCM_RTS | TIOCM_CTS) : 0) |
549 ((v24_sig & RFCOMM_V24_IC) ? TIOCM_RI : 0) | 549 ((v24_sig & RFCOMM_V24_IC) ? TIOCM_RI : 0) |
@@ -561,7 +561,7 @@ static void rfcomm_tty_wakeup(unsigned long arg)
561 BT_DBG("dev %p tty %p", dev, tty); 561 BT_DBG("dev %p tty %p", dev, tty);
562 562
563 if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && tty->ldisc.write_wakeup) 563 if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && tty->ldisc.write_wakeup)
564 (tty->ldisc.write_wakeup)(tty); 564 (tty->ldisc.write_wakeup)(tty);
565 565
566 wake_up_interruptible(&tty->write_wait); 566 wake_up_interruptible(&tty->write_wait);
567#ifdef SERIAL_HAVE_POLL_WAIT 567#ifdef SERIAL_HAVE_POLL_WAIT
@@ -576,7 +576,7 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
576 struct rfcomm_dlc *dlc; 576 struct rfcomm_dlc *dlc;
577 int err, id; 577 int err, id;
578 578
579 id = tty->index; 579 id = tty->index;
580 580
581 BT_DBG("tty %p id %d", tty, id); 581 BT_DBG("tty %p id %d", tty, id);
582 582
@@ -670,7 +670,7 @@ static int rfcomm_tty_write(struct tty_struct *tty, const unsigned char *buf, in
670 size = min_t(uint, count, dlc->mtu); 670 size = min_t(uint, count, dlc->mtu);
671 671
672 skb = rfcomm_wmalloc(dev, size + RFCOMM_SKB_RESERVE, GFP_ATOMIC); 672 skb = rfcomm_wmalloc(dev, size + RFCOMM_SKB_RESERVE, GFP_ATOMIC);
673 673
674 if (!skb) 674 if (!skb)
675 break; 675 break;
676 676
@@ -773,7 +773,7 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
773 return; 773 return;
774 774
775 /* Handle turning off CRTSCTS */ 775 /* Handle turning off CRTSCTS */
776 if ((old->c_cflag & CRTSCTS) && !(new->c_cflag & CRTSCTS)) 776 if ((old->c_cflag & CRTSCTS) && !(new->c_cflag & CRTSCTS))
777 BT_DBG("Turning off CRTSCTS unsupported"); 777 BT_DBG("Turning off CRTSCTS unsupported");
778 778
779 /* Parity on/off and when on, odd/even */ 779 /* Parity on/off and when on, odd/even */
@@ -830,7 +830,7 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
830 } 830 }
831 831
832 /* Handle number of data bits [5-8] */ 832 /* Handle number of data bits [5-8] */
833 if ((old->c_cflag & CSIZE) != (new->c_cflag & CSIZE)) 833 if ((old->c_cflag & CSIZE) != (new->c_cflag & CSIZE))
834 changes |= RFCOMM_RPN_PM_DATA; 834 changes |= RFCOMM_RPN_PM_DATA;
835 835
836 switch (new->c_cflag & CSIZE) { 836 switch (new->c_cflag & CSIZE) {
@@ -868,7 +868,7 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
868 case 9600: 868 case 9600:
869 baud = RFCOMM_RPN_BR_9600; 869 baud = RFCOMM_RPN_BR_9600;
870 break; 870 break;
871 case 19200: 871 case 19200:
872 baud = RFCOMM_RPN_BR_19200; 872 baud = RFCOMM_RPN_BR_19200;
873 break; 873 break;
874 case 38400: 874 case 38400:
@@ -887,7 +887,7 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
887 /* 9600 is standard accordinag to the RFCOMM specification */ 887 /* 9600 is standard accordinag to the RFCOMM specification */
888 baud = RFCOMM_RPN_BR_9600; 888 baud = RFCOMM_RPN_BR_9600;
889 break; 889 break;
890 890
891 } 891 }
892 892
893 if (changes) 893 if (changes)
@@ -978,11 +978,11 @@ static int rfcomm_tty_read_proc(char *buf, char **start, off_t offset, int len,
978 978
979static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp) 979static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp)
980{ 980{
981 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; 981 struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
982 982
983 BT_DBG("tty %p dev %p", tty, dev); 983 BT_DBG("tty %p dev %p", tty, dev);
984 984
985 return dev->modem_status; 985 return dev->modem_status;
986} 986}
987 987
988static int rfcomm_tty_tiocmset(struct tty_struct *tty, struct file *filp, unsigned int set, unsigned int clear) 988static int rfcomm_tty_tiocmset(struct tty_struct *tty, struct file *filp, unsigned int set, unsigned int clear)