diff options
| -rw-r--r-- | drivers/staging/dgrp/dgrp_mon_ops.c | 1 | ||||
| -rw-r--r-- | drivers/staging/dgrp/dgrp_specproc.c | 7 | ||||
| -rw-r--r-- | drivers/staging/dgrp/dgrp_tty.c | 10 | ||||
| -rw-r--r-- | drivers/tty/serial/8250/8250_hp300.c | 20 | ||||
| -rw-r--r-- | drivers/tty/serial/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/tty/serial/sccnxp.c | 1 | ||||
| -rw-r--r-- | include/linux/hsi/Kbuild | 1 | ||||
| -rw-r--r-- | include/linux/ratelimit.h | 27 | ||||
| -rw-r--r-- | include/uapi/linux/hsi/Kbuild | 1 | ||||
| -rw-r--r-- | include/uapi/linux/hsi/hsi_char.h (renamed from include/linux/hsi/hsi_char.h) | 0 | ||||
| -rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 2 |
11 files changed, 43 insertions, 31 deletions
diff --git a/drivers/staging/dgrp/dgrp_mon_ops.c b/drivers/staging/dgrp/dgrp_mon_ops.c index 268dcb95204b..4792d056a365 100644 --- a/drivers/staging/dgrp/dgrp_mon_ops.c +++ b/drivers/staging/dgrp/dgrp_mon_ops.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
| 39 | #include <asm/unaligned.h> | 39 | #include <asm/unaligned.h> |
| 40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
| 41 | #include <linux/uaccess.h> | ||
| 41 | 42 | ||
| 42 | #include "dgrp_common.h" | 43 | #include "dgrp_common.h" |
| 43 | 44 | ||
diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c index 28f5c9ab6b43..24327c3bad83 100644 --- a/drivers/staging/dgrp/dgrp_specproc.c +++ b/drivers/staging/dgrp/dgrp_specproc.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <linux/proc_fs.h> | 39 | #include <linux/proc_fs.h> |
| 40 | #include <linux/ctype.h> | 40 | #include <linux/ctype.h> |
| 41 | #include <linux/seq_file.h> | 41 | #include <linux/seq_file.h> |
| 42 | #include <linux/uaccess.h> | ||
| 42 | #include <linux/vmalloc.h> | 43 | #include <linux/vmalloc.h> |
| 43 | 44 | ||
| 44 | #include "dgrp_common.h" | 45 | #include "dgrp_common.h" |
| @@ -228,6 +229,9 @@ static void register_proc_table(struct dgrp_proc_entry *table, | |||
| 228 | int len; | 229 | int len; |
| 229 | mode_t mode; | 230 | mode_t mode; |
| 230 | 231 | ||
| 232 | if (table == NULL) | ||
| 233 | return; | ||
| 234 | |||
| 231 | for (; table->id; table++) { | 235 | for (; table->id; table++) { |
| 232 | /* Can't do anything without a proc name. */ | 236 | /* Can't do anything without a proc name. */ |
| 233 | if (!table->name) | 237 | if (!table->name) |
| @@ -296,6 +300,9 @@ static void unregister_proc_table(struct dgrp_proc_entry *table, | |||
| 296 | struct proc_dir_entry *de; | 300 | struct proc_dir_entry *de; |
| 297 | struct nd_struct *tmp; | 301 | struct nd_struct *tmp; |
| 298 | 302 | ||
| 303 | if (table == NULL) | ||
| 304 | return; | ||
| 305 | |||
| 299 | list_for_each_entry(tmp, &nd_struct_list, list) { | 306 | list_for_each_entry(tmp, &nd_struct_list, list) { |
| 300 | if ((table == dgrp_net_table) && (tmp->nd_net_de)) { | 307 | if ((table == dgrp_net_table) && (tmp->nd_net_de)) { |
| 301 | unregister_dgrp_device(tmp->nd_net_de); | 308 | unregister_dgrp_device(tmp->nd_net_de); |
diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c index 7d7de873870c..e125b03598d7 100644 --- a/drivers/staging/dgrp/dgrp_tty.c +++ b/drivers/staging/dgrp/dgrp_tty.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/tty.h> | 40 | #include <linux/tty.h> |
| 41 | #include <linux/tty_flip.h> | 41 | #include <linux/tty_flip.h> |
| 42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
| 43 | #include <linux/uaccess.h> | ||
| 43 | 44 | ||
| 44 | #include "dgrp_common.h" | 45 | #include "dgrp_common.h" |
| 45 | 46 | ||
| @@ -3172,6 +3173,9 @@ dgrp_tty_init(struct nd_struct *nd) | |||
| 3172 | */ | 3173 | */ |
| 3173 | 3174 | ||
| 3174 | nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX); | 3175 | nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX); |
| 3176 | if (!nd->nd_serial_ttdriver) | ||
| 3177 | return -ENOMEM; | ||
| 3178 | |||
| 3175 | sprintf(nd->nd_serial_name, "tty_dgrp_%s_", id); | 3179 | sprintf(nd->nd_serial_name, "tty_dgrp_%s_", id); |
| 3176 | 3180 | ||
| 3177 | nd->nd_serial_ttdriver->owner = THIS_MODULE; | 3181 | nd->nd_serial_ttdriver->owner = THIS_MODULE; |
| @@ -3231,6 +3235,9 @@ dgrp_tty_init(struct nd_struct *nd) | |||
| 3231 | } | 3235 | } |
| 3232 | 3236 | ||
| 3233 | nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX); | 3237 | nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX); |
| 3238 | if (!nd->nd_callout_ttdriver) | ||
| 3239 | return -ENOMEM; | ||
| 3240 | |||
| 3234 | sprintf(nd->nd_callout_name, "cu_dgrp_%s_", id); | 3241 | sprintf(nd->nd_callout_name, "cu_dgrp_%s_", id); |
| 3235 | 3242 | ||
| 3236 | nd->nd_callout_ttdriver->owner = THIS_MODULE; | 3243 | nd->nd_callout_ttdriver->owner = THIS_MODULE; |
| @@ -3268,6 +3275,9 @@ dgrp_tty_init(struct nd_struct *nd) | |||
| 3268 | 3275 | ||
| 3269 | 3276 | ||
| 3270 | nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX); | 3277 | nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX); |
| 3278 | if (!nd->nd_xprint_ttdriver) | ||
| 3279 | return -ENOMEM; | ||
| 3280 | |||
| 3271 | sprintf(nd->nd_xprint_name, "pr_dgrp_%s_", id); | 3281 | sprintf(nd->nd_xprint_name, "pr_dgrp_%s_", id); |
| 3272 | 3282 | ||
| 3273 | nd->nd_xprint_ttdriver->owner = THIS_MODULE; | 3283 | nd->nd_xprint_ttdriver->owner = THIS_MODULE; |
diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c index 8f1dd2cc00a8..f3d0edf46644 100644 --- a/drivers/tty/serial/8250/8250_hp300.c +++ b/drivers/tty/serial/8250/8250_hp300.c | |||
| @@ -162,7 +162,7 @@ int __init hp300_setup_serial_console(void) | |||
| 162 | static int __devinit hpdca_init_one(struct dio_dev *d, | 162 | static int __devinit hpdca_init_one(struct dio_dev *d, |
| 163 | const struct dio_device_id *ent) | 163 | const struct dio_device_id *ent) |
| 164 | { | 164 | { |
| 165 | struct uart_port port; | 165 | struct uart_8250_port uart; |
| 166 | int line; | 166 | int line; |
| 167 | 167 | ||
| 168 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 168 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
| @@ -174,19 +174,19 @@ static int __devinit hpdca_init_one(struct dio_dev *d, | |||
| 174 | memset(&uart, 0, sizeof(uart)); | 174 | memset(&uart, 0, sizeof(uart)); |
| 175 | 175 | ||
| 176 | /* Memory mapped I/O */ | 176 | /* Memory mapped I/O */ |
| 177 | port.iotype = UPIO_MEM; | 177 | uart.port.iotype = UPIO_MEM; |
| 178 | port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; | 178 | uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; |
| 179 | port.irq = d->ipl; | 179 | uart.port.irq = d->ipl; |
| 180 | port.uartclk = HPDCA_BAUD_BASE * 16; | 180 | uart.port.uartclk = HPDCA_BAUD_BASE * 16; |
| 181 | port.mapbase = (d->resource.start + UART_OFFSET); | 181 | uart.port.mapbase = (d->resource.start + UART_OFFSET); |
| 182 | port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE); | 182 | uart.port.membase = (char *)(uart.port.mapbase + DIO_VIRADDRBASE); |
| 183 | port.regshift = 1; | 183 | uart.port.regshift = 1; |
| 184 | port.dev = &d->dev; | 184 | uart.port.dev = &d->dev; |
| 185 | line = serial8250_register_8250_port(&uart); | 185 | line = serial8250_register_8250_port(&uart); |
| 186 | 186 | ||
| 187 | if (line < 0) { | 187 | if (line < 0) { |
| 188 | printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d" | 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 | return -ENOMEM; | 190 | return -ENOMEM; |
| 191 | } | 191 | } |
| 192 | 192 | ||
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 233fbaaf2559..2a53be5f010d 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig | |||
| @@ -1150,7 +1150,7 @@ config SERIAL_SC26XX_CONSOLE | |||
| 1150 | Support for Console on SC2681/SC2692 serial ports. | 1150 | Support for Console on SC2681/SC2692 serial ports. |
| 1151 | 1151 | ||
| 1152 | config SERIAL_SCCNXP | 1152 | config SERIAL_SCCNXP |
| 1153 | bool "SCCNXP serial port support" | 1153 | tristate "SCCNXP serial port support" |
| 1154 | depends on !SERIAL_SC26XX | 1154 | depends on !SERIAL_SC26XX |
| 1155 | select SERIAL_CORE | 1155 | select SERIAL_CORE |
| 1156 | default n | 1156 | default n |
| @@ -1162,7 +1162,7 @@ config SERIAL_SCCNXP | |||
| 1162 | 1162 | ||
| 1163 | config SERIAL_SCCNXP_CONSOLE | 1163 | config SERIAL_SCCNXP_CONSOLE |
| 1164 | bool "Console on SCCNXP serial port" | 1164 | bool "Console on SCCNXP serial port" |
| 1165 | depends on SERIAL_SCCNXP | 1165 | depends on SERIAL_SCCNXP=y |
| 1166 | select SERIAL_CORE_CONSOLE | 1166 | select SERIAL_CORE_CONSOLE |
| 1167 | help | 1167 | help |
| 1168 | Support for console on SCCNXP serial ports. | 1168 | Support for console on SCCNXP serial ports. |
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index b7086d004f5f..e821068cd95b 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c | |||
| @@ -971,6 +971,7 @@ static const struct platform_device_id sccnxp_id_table[] = { | |||
| 971 | { "sc28202", SCCNXP_TYPE_SC28202 }, | 971 | { "sc28202", SCCNXP_TYPE_SC28202 }, |
| 972 | { "sc68681", SCCNXP_TYPE_SC68681 }, | 972 | { "sc68681", SCCNXP_TYPE_SC68681 }, |
| 973 | { "sc68692", SCCNXP_TYPE_SC68692 }, | 973 | { "sc68692", SCCNXP_TYPE_SC68692 }, |
| 974 | { }, | ||
| 974 | }; | 975 | }; |
| 975 | MODULE_DEVICE_TABLE(platform, sccnxp_id_table); | 976 | MODULE_DEVICE_TABLE(platform, sccnxp_id_table); |
| 976 | 977 | ||
diff --git a/include/linux/hsi/Kbuild b/include/linux/hsi/Kbuild index 271a770b4784..e69de29bb2d1 100644 --- a/include/linux/hsi/Kbuild +++ b/include/linux/hsi/Kbuild | |||
| @@ -1 +0,0 @@ | |||
| 1 | header-y += hsi_char.h | ||
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index e11ccb4cf48d..0a260d8a18bf 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h | |||
| @@ -46,20 +46,17 @@ extern int ___ratelimit(struct ratelimit_state *rs, const char *func); | |||
| 46 | #define WARN_ON_RATELIMIT(condition, state) \ | 46 | #define WARN_ON_RATELIMIT(condition, state) \ |
| 47 | WARN_ON((condition) && __ratelimit(state)) | 47 | WARN_ON((condition) && __ratelimit(state)) |
| 48 | 48 | ||
| 49 | #define __WARN_RATELIMIT(condition, state, format...) \ | 49 | #define WARN_RATELIMIT(condition, 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...) \ | ||
| 58 | ({ \ | 50 | ({ \ |
| 59 | static DEFINE_RATELIMIT_STATE(_rs, \ | 51 | static DEFINE_RATELIMIT_STATE(_rs, \ |
| 60 | DEFAULT_RATELIMIT_INTERVAL, \ | 52 | DEFAULT_RATELIMIT_INTERVAL, \ |
| 61 | DEFAULT_RATELIMIT_BURST); \ | 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 | #else | 62 | #else |
| @@ -67,15 +64,9 @@ extern int ___ratelimit(struct ratelimit_state *rs, const char *func); | |||
| 67 | #define WARN_ON_RATELIMIT(condition, state) \ | 64 | #define WARN_ON_RATELIMIT(condition, state) \ |
| 68 | WARN_ON(condition) | 65 | WARN_ON(condition) |
| 69 | 66 | ||
| 70 | #define __WARN_RATELIMIT(condition, state, format...) \ | 67 | #define WARN_RATELIMIT(condition, format, ...) \ |
| 71 | ({ \ | ||
| 72 | int rtn = WARN(condition, format); \ | ||
| 73 | rtn; \ | ||
| 74 | }) | ||
| 75 | |||
| 76 | #define WARN_RATELIMIT(condition, format...) \ | ||
| 77 | ({ \ | 68 | ({ \ |
| 78 | int rtn = WARN(condition, format); \ | 69 | int rtn = WARN(condition, format, ##__VA_ARGS__); \ |
| 79 | rtn; \ | 70 | rtn; \ |
| 80 | }) | 71 | }) |
| 81 | 72 | ||
diff --git a/include/uapi/linux/hsi/Kbuild b/include/uapi/linux/hsi/Kbuild index aafaa5aa54d4..30ab3cd3b8a5 100644 --- a/include/uapi/linux/hsi/Kbuild +++ b/include/uapi/linux/hsi/Kbuild | |||
| @@ -1 +1,2 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += hsi_char.h | ||
diff --git a/include/linux/hsi/hsi_char.h b/include/uapi/linux/hsi/hsi_char.h index 76160b4f455d..76160b4f455d 100644 --- a/include/linux/hsi/hsi_char.h +++ b/include/uapi/linux/hsi/hsi_char.h | |||
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 95a3a7a336ba..496ce2cebcd7 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
| @@ -421,6 +421,8 @@ static int ircomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) | |||
| 421 | hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL); | 421 | hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL); |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | tty->driver_data = self; | ||
| 425 | |||
| 424 | return tty_port_install(&self->port, driver, tty); | 426 | return tty_port_install(&self->port, driver, tty); |
| 425 | } | 427 | } |
| 426 | 428 | ||
