Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* 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

+43 -31
+1
drivers/staging/dgrp/dgrp_mon_ops.c
··· 38 38 #include <linux/sched.h> 39 39 #include <asm/unaligned.h> 40 40 #include <linux/proc_fs.h> 41 + #include <linux/uaccess.h> 41 42 42 43 #include "dgrp_common.h" 43 44
+7
drivers/staging/dgrp/dgrp_specproc.c
··· 39 39 #include <linux/proc_fs.h> 40 40 #include <linux/ctype.h> 41 41 #include <linux/seq_file.h> 42 + #include <linux/uaccess.h> 42 43 #include <linux/vmalloc.h> 43 44 44 45 #include "dgrp_common.h" ··· 229 228 int len; 230 229 mode_t mode; 231 230 231 + if (table == NULL) 232 + return; 233 + 232 234 for (; table->id; table++) { 233 235 /* Can't do anything without a proc name. */ 234 236 if (!table->name) ··· 299 295 { 300 296 struct proc_dir_entry *de; 301 297 struct nd_struct *tmp; 298 + 299 + if (table == NULL) 300 + return; 302 301 303 302 list_for_each_entry(tmp, &nd_struct_list, list) { 304 303 if ((table == dgrp_net_table) && (tmp->nd_net_de)) {
+10
drivers/staging/dgrp/dgrp_tty.c
··· 40 40 #include <linux/tty.h> 41 41 #include <linux/tty_flip.h> 42 42 #include <linux/sched.h> 43 + #include <linux/uaccess.h> 43 44 44 45 #include "dgrp_common.h" 45 46 ··· 3173 3172 */ 3174 3173 3175 3174 nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX); 3175 + if (!nd->nd_serial_ttdriver) 3176 + return -ENOMEM; 3177 + 3176 3178 sprintf(nd->nd_serial_name, "tty_dgrp_%s_", id); 3177 3179 3178 3180 nd->nd_serial_ttdriver->owner = THIS_MODULE; ··· 3235 3231 } 3236 3232 3237 3233 nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX); 3234 + if (!nd->nd_callout_ttdriver) 3235 + return -ENOMEM; 3236 + 3238 3237 sprintf(nd->nd_callout_name, "cu_dgrp_%s_", id); 3239 3238 3240 3239 nd->nd_callout_ttdriver->owner = THIS_MODULE; ··· 3275 3268 3276 3269 3277 3270 nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX); 3271 + if (!nd->nd_xprint_ttdriver) 3272 + return -ENOMEM; 3273 + 3278 3274 sprintf(nd->nd_xprint_name, "pr_dgrp_%s_", id); 3279 3275 3280 3276 nd->nd_xprint_ttdriver->owner = THIS_MODULE;
+10 -10
drivers/tty/serial/8250/8250_hp300.c
··· 162 162 static int __devinit hpdca_init_one(struct dio_dev *d, 163 163 const struct dio_device_id *ent) 164 164 { 165 - struct uart_port port; 165 + struct uart_8250_port uart; 166 166 int line; 167 167 168 168 #ifdef CONFIG_SERIAL_8250_CONSOLE ··· 174 174 memset(&uart, 0, sizeof(uart)); 175 175 176 176 /* Memory mapped I/O */ 177 - port.iotype = UPIO_MEM; 178 - port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; 179 - port.irq = d->ipl; 180 - port.uartclk = HPDCA_BAUD_BASE * 16; 181 - port.mapbase = (d->resource.start + UART_OFFSET); 182 - port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE); 183 - port.regshift = 1; 184 - port.dev = &d->dev; 177 + uart.port.iotype = UPIO_MEM; 178 + uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; 179 + uart.port.irq = d->ipl; 180 + uart.port.uartclk = HPDCA_BAUD_BASE * 16; 181 + uart.port.mapbase = (d->resource.start + UART_OFFSET); 182 + uart.port.membase = (char *)(uart.port.mapbase + DIO_VIRADDRBASE); 183 + uart.port.regshift = 1; 184 + uart.port.dev = &d->dev; 185 185 line = serial8250_register_8250_port(&uart); 186 186 187 187 if (line < 0) { 188 188 printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d" 189 - " irq %d failed\n", d->scode, port.irq); 189 + " irq %d failed\n", d->scode, uart.port.irq); 190 190 return -ENOMEM; 191 191 } 192 192
+2 -2
drivers/tty/serial/Kconfig
··· 1150 1150 Support for Console on SC2681/SC2692 serial ports. 1151 1151 1152 1152 config SERIAL_SCCNXP 1153 - bool "SCCNXP serial port support" 1153 + tristate "SCCNXP serial port support" 1154 1154 depends on !SERIAL_SC26XX 1155 1155 select SERIAL_CORE 1156 1156 default n ··· 1162 1162 1163 1163 config SERIAL_SCCNXP_CONSOLE 1164 1164 bool "Console on SCCNXP serial port" 1165 - depends on SERIAL_SCCNXP 1165 + depends on SERIAL_SCCNXP=y 1166 1166 select SERIAL_CORE_CONSOLE 1167 1167 help 1168 1168 Support for console on SCCNXP serial ports.
+1
drivers/tty/serial/sccnxp.c
··· 971 971 { "sc28202", SCCNXP_TYPE_SC28202 }, 972 972 { "sc68681", SCCNXP_TYPE_SC68681 }, 973 973 { "sc68692", SCCNXP_TYPE_SC68692 }, 974 + { }, 974 975 }; 975 976 MODULE_DEVICE_TABLE(platform, sccnxp_id_table); 976 977
-1
include/linux/hsi/Kbuild
··· 1 - header-y += hsi_char.h
include/linux/hsi/hsi_char.h include/uapi/linux/hsi/hsi_char.h
+9 -18
include/linux/ratelimit.h
··· 46 46 #define WARN_ON_RATELIMIT(condition, state) \ 47 47 WARN_ON((condition) && __ratelimit(state)) 48 48 49 - #define __WARN_RATELIMIT(condition, state, format...) \ 50 - ({ \ 51 - int rtn = 0; \ 52 - if (unlikely(__ratelimit(state))) \ 53 - rtn = WARN(condition, format); \ 54 - rtn; \ 55 - }) 56 - 57 - #define WARN_RATELIMIT(condition, format...) \ 49 + #define WARN_RATELIMIT(condition, format, ...) \ 58 50 ({ \ 59 51 static DEFINE_RATELIMIT_STATE(_rs, \ 60 52 DEFAULT_RATELIMIT_INTERVAL, \ 61 53 DEFAULT_RATELIMIT_BURST); \ 62 - __WARN_RATELIMIT(condition, &_rs, format); \ 54 + int rtn = !!(condition); \ 55 + \ 56 + if (unlikely(rtn && __ratelimit(&_rs))) \ 57 + WARN(rtn, format, ##__VA_ARGS__); \ 58 + \ 59 + rtn; \ 63 60 }) 64 61 65 62 #else ··· 64 67 #define WARN_ON_RATELIMIT(condition, state) \ 65 68 WARN_ON(condition) 66 69 67 - #define __WARN_RATELIMIT(condition, state, format...) \ 70 + #define WARN_RATELIMIT(condition, format, ...) \ 68 71 ({ \ 69 - int rtn = WARN(condition, format); \ 70 - rtn; \ 71 - }) 72 - 73 - #define WARN_RATELIMIT(condition, format...) \ 74 - ({ \ 75 - int rtn = WARN(condition, format); \ 72 + int rtn = WARN(condition, format, ##__VA_ARGS__); \ 76 73 rtn; \ 77 74 }) 78 75
+1
include/uapi/linux/hsi/Kbuild
··· 1 1 # UAPI Header export list 2 + header-y += hsi_char.h
+2
net/irda/ircomm/ircomm_tty.c
··· 421 421 hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL); 422 422 } 423 423 424 + tty->driver_data = self; 425 + 424 426 return tty_port_install(&self->port, driver, tty); 425 427 } 426 428