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

Commit ccfc2730 authored by Linus Torvalds's avatar Linus Torvalds
Browse files


Pull TTY fixes from Greg Kroah-Hartman:
 "Here are some tty and serial driver fixes for your 3.7-rc1 tree.

  Again, the UABI header file fixes, and a number of build and runtime
  serial driver bugfixes that solve problems people have been reporting
  (the staging driver is a tty driver, hence the fixes coming in through
  this tree.)

  All of these have been in the linux-next tree for a while.

  Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">

* tag 'tty-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  staging: dgrp: check return value of alloc_tty_driver
  staging: dgrp: check for NULL pointer in (un)register_proc_table
  serial/8250_hp300: Missing 8250 register interface conversion bits
  UAPI: (Scripted) Disintegrate include/linux/hsi
  tty: serial: sccnxp: Fix bug with unterminated platform_id list
  staging: serial: dgrp: Add missing #include <linux/uaccess.h>
  serial: sccnxp: Allows the driver to be compiled as a module
  tty: Fix bogus "callbacks suppressed" messages
  net, TTY: initialize tty->driver_data before usage
parents 42bf3e27 178e485a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include <linux/sched.h>
#include <asm/unaligned.h>
#include <linux/proc_fs.h>
#include <linux/uaccess.h>

#include "dgrp_common.h"

+7 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include <linux/proc_fs.h>
#include <linux/ctype.h>
#include <linux/seq_file.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>

#include "dgrp_common.h"
@@ -228,6 +229,9 @@ static void register_proc_table(struct dgrp_proc_entry *table,
	int len;
	mode_t mode;

	if (table == NULL)
		return;

	for (; table->id; table++) {
		/* Can't do anything without a proc name. */
		if (!table->name)
@@ -296,6 +300,9 @@ static void unregister_proc_table(struct dgrp_proc_entry *table,
	struct proc_dir_entry *de;
	struct nd_struct *tmp;

	if (table == NULL)
		return;

	list_for_each_entry(tmp, &nd_struct_list, list) {
		if ((table == dgrp_net_table) && (tmp->nd_net_de)) {
			unregister_dgrp_device(tmp->nd_net_de);
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/sched.h>
#include <linux/uaccess.h>

#include "dgrp_common.h"

@@ -3172,6 +3173,9 @@ dgrp_tty_init(struct nd_struct *nd)
	 */

	nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX);
	if (!nd->nd_serial_ttdriver)
		return -ENOMEM;

	sprintf(nd->nd_serial_name,  "tty_dgrp_%s_", id);

	nd->nd_serial_ttdriver->owner = THIS_MODULE;
@@ -3231,6 +3235,9 @@ dgrp_tty_init(struct nd_struct *nd)
	}

	nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX);
	if (!nd->nd_callout_ttdriver)
		return -ENOMEM;

	sprintf(nd->nd_callout_name, "cu_dgrp_%s_",  id);

	nd->nd_callout_ttdriver->owner = THIS_MODULE;
@@ -3268,6 +3275,9 @@ dgrp_tty_init(struct nd_struct *nd)


	nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX);
	if (!nd->nd_xprint_ttdriver)
		return -ENOMEM;

	sprintf(nd->nd_xprint_name,  "pr_dgrp_%s_", id);

	nd->nd_xprint_ttdriver->owner = THIS_MODULE;
+10 −10
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ int __init hp300_setup_serial_console(void)
static int __devinit hpdca_init_one(struct dio_dev *d,
				const struct dio_device_id *ent)
{
	struct uart_port port;
	struct uart_8250_port uart;
	int line;

#ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -174,19 +174,19 @@ static int __devinit hpdca_init_one(struct dio_dev *d,
	memset(&uart, 0, sizeof(uart));

	/* Memory mapped I/O */
	port.iotype = UPIO_MEM;
	port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF;
	port.irq = d->ipl;
	port.uartclk = HPDCA_BAUD_BASE * 16;
	port.mapbase = (d->resource.start + UART_OFFSET);
	port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE);
	port.regshift = 1;
	port.dev = &d->dev;
	uart.port.iotype = UPIO_MEM;
	uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF;
	uart.port.irq = d->ipl;
	uart.port.uartclk = HPDCA_BAUD_BASE * 16;
	uart.port.mapbase = (d->resource.start + UART_OFFSET);
	uart.port.membase = (char *)(uart.port.mapbase + DIO_VIRADDRBASE);
	uart.port.regshift = 1;
	uart.port.dev = &d->dev;
	line = serial8250_register_8250_port(&uart);

	if (line < 0) {
		printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d"
		       " irq %d failed\n", d->scode, port.irq);
		       " irq %d failed\n", d->scode, uart.port.irq);
		return -ENOMEM;
	}

+2 −2
Original line number Diff line number Diff line
@@ -1150,7 +1150,7 @@ config SERIAL_SC26XX_CONSOLE
	  Support for Console on SC2681/SC2692 serial ports.

config SERIAL_SCCNXP
	bool "SCCNXP serial port support"
	tristate "SCCNXP serial port support"
	depends on !SERIAL_SC26XX
	select SERIAL_CORE
	default n
@@ -1162,7 +1162,7 @@ config SERIAL_SCCNXP

config SERIAL_SCCNXP_CONSOLE
	bool "Console on SCCNXP serial port"
	depends on SERIAL_SCCNXP
	depends on SERIAL_SCCNXP=y
	select SERIAL_CORE_CONSOLE
	help
	  Support for console on SCCNXP serial ports.
Loading