提交 d6ee1a28 编写于 作者: L Linus Torvalds

Merge tag 'tty-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull TTY fixes from Greg Kroah-Hartman:
 "Here are two TTY driver fixes for 3.7-rc5.

  They resolve a bug in the hvc driver that has been reported, and fix a
  problem with the list of device ids in the max310x serial driver.

  Both have been in linux-next for a while.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'tty-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: serial: max310x: Add terminating entry for spi_device_id table
  TTY: hvc_console, fix port reference count going to zero prematurely
...@@ -424,7 +424,6 @@ static void hvc_hangup(struct tty_struct *tty) ...@@ -424,7 +424,6 @@ static void hvc_hangup(struct tty_struct *tty)
{ {
struct hvc_struct *hp = tty->driver_data; struct hvc_struct *hp = tty->driver_data;
unsigned long flags; unsigned long flags;
int temp_open_count;
if (!hp) if (!hp)
return; return;
...@@ -444,7 +443,6 @@ static void hvc_hangup(struct tty_struct *tty) ...@@ -444,7 +443,6 @@ static void hvc_hangup(struct tty_struct *tty)
return; return;
} }
temp_open_count = hp->port.count;
hp->port.count = 0; hp->port.count = 0;
spin_unlock_irqrestore(&hp->port.lock, flags); spin_unlock_irqrestore(&hp->port.lock, flags);
tty_port_tty_set(&hp->port, NULL); tty_port_tty_set(&hp->port, NULL);
...@@ -453,11 +451,6 @@ static void hvc_hangup(struct tty_struct *tty) ...@@ -453,11 +451,6 @@ static void hvc_hangup(struct tty_struct *tty)
if (hp->ops->notifier_hangup) if (hp->ops->notifier_hangup)
hp->ops->notifier_hangup(hp, hp->data); hp->ops->notifier_hangup(hp, hp->data);
while(temp_open_count) {
--temp_open_count;
tty_port_put(&hp->port);
}
} }
/* /*
......
...@@ -1239,6 +1239,7 @@ static int __devexit max310x_remove(struct spi_device *spi) ...@@ -1239,6 +1239,7 @@ static int __devexit max310x_remove(struct spi_device *spi)
static const struct spi_device_id max310x_id_table[] = { static const struct spi_device_id max310x_id_table[] = {
{ "max3107", MAX310X_TYPE_MAX3107 }, { "max3107", MAX310X_TYPE_MAX3107 },
{ "max3108", MAX310X_TYPE_MAX3108 }, { "max3108", MAX310X_TYPE_MAX3108 },
{ }
}; };
MODULE_DEVICE_TABLE(spi, max310x_id_table); MODULE_DEVICE_TABLE(spi, max310x_id_table);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册