Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 474432 | Differences between
and this patch

Collapse All | Expand All

(-)a/net/bluetooth/rfcomm/tty.c (-6 / +6 lines)
Lines 124-132 static void rfcomm_dev_shutdown(struct tty_port *port) Link Here
124
{
124
{
125
	struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port);
125
	struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port);
126
126
127
	if (dev->tty_dev->parent)
128
		device_move(dev->tty_dev, NULL, DPM_ORDER_DEV_LAST);
129
130
	/* close the dlc */
127
	/* close the dlc */
131
	rfcomm_dlc_close(dev->dlc, 0);
128
	rfcomm_dlc_close(dev->dlc, 0);
132
}
129
}
Lines 577-585 static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err) Link Here
577
574
578
	dev->err = err;
575
	dev->err = err;
579
	if (dlc->state == BT_CONNECTED) {
576
	if (dlc->state == BT_CONNECTED) {
580
		device_move(dev->tty_dev, rfcomm_get_device(dev),
581
			    DPM_ORDER_DEV_AFTER_PARENT);
582
583
		wake_up_interruptible(&dev->port.open_wait);
577
		wake_up_interruptible(&dev->port.open_wait);
584
	} else if (dlc->state == BT_CLOSED)
578
	} else if (dlc->state == BT_CLOSED)
585
		tty_port_tty_hangup(&dev->port, false);
579
		tty_port_tty_hangup(&dev->port, false);
Lines 632-637 static void rfcomm_tty_cleanup(struct tty_struct *tty) Link Here
632
{
626
{
633
	struct rfcomm_dev *dev = tty->driver_data;
627
	struct rfcomm_dev *dev = tty->driver_data;
634
628
629
	if (dev->tty_dev->parent)
630
		device_move(dev->tty_dev, NULL, DPM_ORDER_DEV_LAST);
631
635
	clear_bit(RFCOMM_TTY_ATTACHED, &dev->flags);
632
	clear_bit(RFCOMM_TTY_ATTACHED, &dev->flags);
636
633
637
	rfcomm_dlc_lock(dev->dlc);
634
	rfcomm_dlc_lock(dev->dlc);
Lines 674-679 static int rfcomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) Link Here
674
	if (err)
671
	if (err)
675
		rfcomm_tty_cleanup(tty);
672
		rfcomm_tty_cleanup(tty);
676
673
674
	device_move(dev->tty_dev, rfcomm_get_device(dev),
675
		    DPM_ORDER_DEV_AFTER_PARENT);
676
677
	/* take over the tty_port reference if it was created with the
677
	/* take over the tty_port reference if it was created with the
678
	 * flag RFCOMM_RELEASE_ONHUP. This will force the release of the port
678
	 * flag RFCOMM_RELEASE_ONHUP. This will force the release of the port
679
	 * when the last process closes the tty. This behaviour is expected by
679
	 * when the last process closes the tty. This behaviour is expected by

Return to bug 474432