Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afc5ab09 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

tty: Remove ASYNC_CLOSING



The tty core no longer provides nor uses ASYNC_CLOSING; remove from
tty_port_close_start() and tty_port_close_end() as well as tty drivers
which open-code these state changes. Unfortunately, even though the
bit is masked from userspace, its inclusion in a uapi header precludes
removing the macro.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: linux-cris-kernel@axis.com
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a657eecd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -643,7 +643,6 @@ static void raw3215_shutdown(struct raw3215_info *raw)
	if ((raw->flags & RAW3215_WORKING) ||
	    raw->queued_write != NULL ||
	    raw->queued_read != NULL) {
		raw->port.flags |= ASYNC_CLOSING;
		add_wait_queue(&raw->empty_wait, &wait);
		set_current_state(TASK_INTERRUPTIBLE);
		spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
@@ -651,7 +650,7 @@ static void raw3215_shutdown(struct raw3215_info *raw)
		spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
		remove_wait_queue(&raw->empty_wait, &wait);
		set_current_state(TASK_RUNNING);
		raw->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_CLOSING);
		raw->port.flags &= ~ASYNC_INITIALIZED;
	}
	spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
}
+1 −1
Original line number Diff line number Diff line
@@ -1042,7 +1042,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
		}
	}
	spin_lock_irq(&port->lock);
	info->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_CLOSING | ASYNC_NORMAL_ACTIVE);
	info->port.flags &= ~(ASYNC_INITIALIZED | ASYNC_NORMAL_ACTIVE);
	tty->closing = 0;
	spin_unlock_irq(&port->lock);
	mutex_unlock(&port->mutex);
+1 −2
Original line number Diff line number Diff line
@@ -1028,7 +1028,6 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
		local_irq_restore(flags);
		return;
	}
	port->flags |= ASYNC_CLOSING;
	/*
	 * Now we wait for the transmit buffer to clear; and we notify 
	 * the line discipline to only process XON/XOFF characters.
@@ -1058,7 +1057,7 @@ static void rs_close(struct tty_struct *tty, struct file *filp)
			msleep_interruptible(jiffies_to_msecs(port->close_delay));
		wake_up_interruptible(&port->open_wait);
	}
	port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
	port->flags &= ~ASYNC_NORMAL_ACTIVE;
	local_irq_restore(flags);
}

+1 −2
Original line number Diff line number Diff line
@@ -3610,7 +3610,6 @@ rs_close(struct tty_struct *tty, struct file * filp)
		local_irq_restore(flags);
		return;
	}
	info->port.flags |= ASYNC_CLOSING;
	/*
	 * Now we wait for the transmit buffer to clear; and we notify
	 * the line discipline to only process XON/XOFF characters.
@@ -3649,7 +3648,7 @@ rs_close(struct tty_struct *tty, struct file * filp)
			schedule_timeout_interruptible(info->port.close_delay);
		wake_up_interruptible(&info->port.open_wait);
	}
	info->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
	info->port.flags &= ~ASYNC_NORMAL_ACTIVE;
	local_irq_restore(flags);

	/* port closed */
+0 −1
Original line number Diff line number Diff line
@@ -1423,7 +1423,6 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
	 * Wake up anyone trying to open this port.
	 */
	clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
	clear_bit(ASYNCB_CLOSING, &port->flags);
	spin_unlock_irq(&port->lock);
	wake_up_interruptible(&port->open_wait);

Loading