diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-05 14:19:44 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-05 14:19:44 -0700 |
| commit | 9e54cc2f815f57852a179325184efe7fc2219be0 (patch) | |
| tree | 8346597b73cb9ad21ac8316bd3217f040e0c73d7 /tty | |
| parent | bb6875565ac14ec6885ed0c21119899200d4f10a (diff) | |
| download | patches-9e54cc2f815f57852a179325184efe7fc2219be0.tar.gz | |
usb patches
Diffstat (limited to 'tty')
| -rw-r--r-- | tty/serial-mfd-snprintf-returns-largish-values.patch | 4 | ||||
| -rw-r--r-- | tty/serial-mrst_max3110-make-the-irq-option-runtime.patch | 10 | ||||
| -rw-r--r-- | tty/serial-mrst_max3110-some-code-cleanup.patch | 66 |
3 files changed, 40 insertions, 40 deletions
diff --git a/tty/serial-mfd-snprintf-returns-largish-values.patch b/tty/serial-mfd-snprintf-returns-largish-values.patch index 9a0835027853a1..db955f6b273191 100644 --- a/tty/serial-mfd-snprintf-returns-largish-values.patch +++ b/tty/serial-mfd-snprintf-returns-largish-values.patch @@ -23,7 +23,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c -@@ -171,6 +171,9 @@ static ssize_t port_show_regs(struct fil +@@ -172,6 +172,9 @@ static ssize_t port_show_regs(struct fil len += snprintf(buf + len, HSU_REGS_BUFSIZE - len, "DIV: \t\t0x%08x\n", serial_in(up, UART_DIV)); @@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); kfree(buf); return ret; -@@ -218,6 +221,9 @@ static ssize_t dma_show_regs(struct file +@@ -219,6 +222,9 @@ static ssize_t dma_show_regs(struct file len += snprintf(buf + len, HSU_REGS_BUFSIZE - len, "D0TSR: \t\t0x%08x\n", chan_readl(chan, HSU_CH_D3TSR)); diff --git a/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch b/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch index 13df6777ab34db..7a4a0131f38ca6 100644 --- a/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch +++ b/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch @@ -40,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> depends on PCI --- a/drivers/serial/mrst_max3110.c +++ b/drivers/serial/mrst_max3110.c -@@ -446,7 +446,6 @@ static int max3110_main_thread(void *_ma +@@ -447,7 +447,6 @@ static int max3110_main_thread(void *_ma return ret; } @@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static irqreturn_t serial_m3110_irq(int irq, void *dev_id) { struct uart_max3110 *max = dev_id; -@@ -458,7 +457,7 @@ static irqreturn_t serial_m3110_irq(int +@@ -459,7 +458,7 @@ static irqreturn_t serial_m3110_irq(int return IRQ_HANDLED; } @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* if don't use RX IRQ, then need a thread to polling read */ static int max3110_read_thread(void *_max) { -@@ -481,7 +480,6 @@ static int max3110_read_thread(void *_ma +@@ -482,7 +481,6 @@ static int max3110_read_thread(void *_ma return 0; } @@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static int serial_m3110_startup(struct uart_port *port) { -@@ -504,34 +502,38 @@ static int serial_m3110_startup(struct u +@@ -505,34 +503,38 @@ static int serial_m3110_startup(struct u /* as we use thread to handle tx/rx, need set low latency */ port->state->port.tty->low_latency = 1; @@ -125,7 +125,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return ret; } -@@ -550,9 +552,8 @@ static void serial_m3110_shutdown(struct +@@ -551,9 +553,8 @@ static void serial_m3110_shutdown(struct max->read_thread = NULL; } diff --git a/tty/serial-mrst_max3110-some-code-cleanup.patch b/tty/serial-mrst_max3110-some-code-cleanup.patch index a9315cc5cee5f0..0d85c63418e1fa 100644 --- a/tty/serial-mrst_max3110-some-code-cleanup.patch +++ b/tty/serial-mrst_max3110-some-code-cleanup.patch @@ -36,8 +36,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, -@@ -31,18 +31,13 @@ - #include <linux/ioport.h> +@@ -32,18 +32,13 @@ + #include <linux/irq.h> #include <linux/init.h> #include <linux/console.h> -#include <linux/sysrq.h> @@ -55,7 +55,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #include "mrst_max3110.h" -@@ -55,7 +50,7 @@ +@@ -56,7 +51,7 @@ struct uart_max3110 { struct uart_port port; struct spi_device *spi; @@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> wait_queue_head_t wq; struct task_struct *main_thread; -@@ -66,35 +61,30 @@ struct uart_max3110 { +@@ -67,35 +62,30 @@ struct uart_max3110 { u16 cur_conf; u8 clock; u8 parity, word_7bits; @@ -107,7 +107,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> spi_message_init(&message); memset(&x, 0, sizeof x); x.len = len; -@@ -103,7 +93,7 @@ int max3110_write_then_read(struct uart_ +@@ -104,7 +94,7 @@ int max3110_write_then_read(struct uart_ spi_message_add_tail(&x, &message); if (always_fast) @@ -116,7 +116,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> else if (max->baud) x.speed_hz = max->baud; -@@ -112,58 +102,80 @@ int max3110_write_then_read(struct uart_ +@@ -113,58 +103,80 @@ int max3110_write_then_read(struct uart_ return ret; } @@ -224,7 +224,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return j; } -@@ -177,10 +189,6 @@ static void serial_m3110_con_putchar(str +@@ -178,10 +190,6 @@ static void serial_m3110_con_putchar(str xmit->buf[xmit->head] = (char)ch; xmit->head = (xmit->head + 1) & (PAGE_SIZE - 1); } @@ -235,7 +235,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* -@@ -196,6 +204,9 @@ static void serial_m3110_con_write(struc +@@ -197,6 +205,9 @@ static void serial_m3110_con_write(struc return; uart_console_write(&pmax->port, s, count, serial_m3110_con_putchar); @@ -245,7 +245,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } static int __init -@@ -209,6 +220,9 @@ serial_m3110_con_setup(struct console *c +@@ -210,6 +221,9 @@ serial_m3110_con_setup(struct console *c pr_info(PR_FMT "setting up console\n"); @@ -255,7 +255,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (!max) { pr_err(PR_FMT "pmax is NULL, return"); return -ENODEV; -@@ -239,8 +253,6 @@ static struct console serial_m3110_conso +@@ -240,8 +254,6 @@ static struct console serial_m3110_conso .data = &serial_m3110_reg, }; @@ -264,7 +264,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static unsigned int serial_m3110_tx_empty(struct uart_port *port) { return 1; -@@ -258,32 +270,44 @@ static void serial_m3110_stop_rx(struct +@@ -259,32 +271,44 @@ static void serial_m3110_stop_rx(struct } #define WORDS_PER_XFER 128 @@ -319,7 +319,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } if (j) -@@ -293,6 +317,8 @@ static inline void send_circ_buf(struct +@@ -294,6 +318,8 @@ static inline void send_circ_buf(struct left -= len; } } @@ -328,7 +328,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } static void transmit_char(struct uart_max3110 *max) -@@ -312,8 +338,10 @@ static void transmit_char(struct uart_ma +@@ -313,8 +339,10 @@ static void transmit_char(struct uart_ma serial_m3110_stop_tx(port); } @@ -341,7 +341,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static void serial_m3110_start_tx(struct uart_port *port) { struct uart_max3110 *max = -@@ -335,7 +363,7 @@ static void receive_chars(struct uart_ma +@@ -336,7 +364,7 @@ static void receive_chars(struct uart_ma tty = port->state->port.tty; if (!tty) @@ -350,7 +350,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> while (len) { usable = tty_buffer_request_room(tty, len); -@@ -343,32 +371,37 @@ static void receive_chars(struct uart_ma +@@ -344,32 +372,37 @@ static void receive_chars(struct uart_ma tty_insert_flip_string(tty, str, usable); str += usable; port->icount.rx += usable; @@ -398,7 +398,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> receive_chars(max, recv_buf, total); pbuf = recv_buf; total = 0; -@@ -396,7 +429,7 @@ static int max3110_main_thread(void *_ma +@@ -397,7 +430,7 @@ static int max3110_main_thread(void *_ma mutex_lock(&max->thread_mutex); if (test_and_clear_bit(BIT_IRQ_PENDING, &max->uart_flags)) @@ -407,7 +407,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* first handle console output */ if (test_and_clear_bit(CON_TX_NEEDED, &max->uart_flags)) -@@ -433,9 +466,14 @@ static int max3110_read_thread(void *_ma +@@ -434,9 +467,14 @@ static int max3110_read_thread(void *_ma pr_info(PR_FMT "start read thread\n"); do { @@ -425,7 +425,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 20); -@@ -452,15 +490,16 @@ static int serial_m3110_startup(struct u +@@ -453,15 +491,16 @@ static int serial_m3110_startup(struct u u16 config = 0; int ret = 0; @@ -445,7 +445,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* as we use thread to handle tx/rx, need set low latency */ port->state->port.tty->low_latency = 1; -@@ -471,14 +510,30 @@ static int serial_m3110_startup(struct u +@@ -472,14 +511,30 @@ static int serial_m3110_startup(struct u if (ret) return ret; @@ -479,7 +479,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> max->cur_conf = config; return 0; -@@ -515,8 +570,7 @@ static int serial_m3110_request_port(str +@@ -516,8 +571,7 @@ static int serial_m3110_request_port(str static void serial_m3110_config_port(struct uart_port *port, int flags) { @@ -489,7 +489,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } static int -@@ -551,6 +605,9 @@ serial_m3110_set_termios(struct uart_por +@@ -552,6 +606,9 @@ serial_m3110_set_termios(struct uart_por new_conf |= WC_7BIT_WORD; break; default: @@ -499,7 +499,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> case CS8: cval = UART_LCR_WLEN8; new_conf |= WC_8BIT_WORD; -@@ -559,7 +616,7 @@ serial_m3110_set_termios(struct uart_por +@@ -560,7 +617,7 @@ serial_m3110_set_termios(struct uart_por baud = uart_get_baud_rate(port, termios, old, 0, 230400); @@ -508,7 +508,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> switch (baud) { case 300: clk_div = WC_BAUD_DR384; -@@ -595,7 +652,7 @@ serial_m3110_set_termios(struct uart_por +@@ -596,7 +653,7 @@ serial_m3110_set_termios(struct uart_por if (max->clock & MAX3110_HIGH_CLK) break; default: @@ -517,7 +517,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> baud = max->baud; clk_div = max->cur_conf & WC_BAUD_DIV_MASK; tty_termios_encode_baud_rate(termios, baud, baud); -@@ -603,15 +660,21 @@ serial_m3110_set_termios(struct uart_por +@@ -604,15 +661,21 @@ serial_m3110_set_termios(struct uart_por if (max->clock & MAX3110_HIGH_CLK) { clk_div += 1; @@ -541,7 +541,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (termios->c_cflag & CSTOPB) new_conf |= WC_2_STOPBITS; else -@@ -631,13 +694,14 @@ serial_m3110_set_termios(struct uart_por +@@ -632,13 +695,14 @@ serial_m3110_set_termios(struct uart_por new_conf |= WC_TAG; if (new_conf != max->cur_conf) { @@ -560,7 +560,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static unsigned int serial_m3110_get_mctrl(struct uart_port *port) { return TIOCM_DSR | TIOCM_CAR | TIOCM_DSR; -@@ -671,7 +735,7 @@ struct uart_ops serial_m3110_ops = { +@@ -672,7 +736,7 @@ struct uart_ops serial_m3110_ops = { .break_ctl = serial_m3110_break_ctl, .startup = serial_m3110_startup, .shutdown = serial_m3110_shutdown, @@ -569,7 +569,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> .pm = serial_m3110_pm, .type = serial_m3110_type, .release_port = serial_m3110_release_port, -@@ -687,52 +751,60 @@ static struct uart_driver serial_m3110_r +@@ -688,52 +752,60 @@ static struct uart_driver serial_m3110_r .major = TTY_MAJOR, .minor = 64, .nr = 1, @@ -646,7 +646,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> max->irq = (u16)spi->irq; mutex_init(&max->thread_mutex); -@@ -754,13 +826,15 @@ static int serial_m3110_probe(struct spi +@@ -755,13 +827,15 @@ static int serial_m3110_probe(struct spi ret = -ENODEV; goto err_get_page; } @@ -665,7 +665,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> max->main_thread = kthread_run(max3110_main_thread, max, "max3110_main"); -@@ -769,8 +843,10 @@ static int serial_m3110_probe(struct spi +@@ -770,8 +844,10 @@ static int serial_m3110_probe(struct spi goto err_kthread; } @@ -677,7 +677,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> max->port.membase = (void *)0xff110000; uart_add_one_port(&serial_m3110_reg, &max->port); -@@ -779,19 +855,17 @@ static int serial_m3110_probe(struct spi +@@ -780,19 +856,17 @@ static int serial_m3110_probe(struct spi err_kthread: free_page((unsigned long)buffer); err_get_page: @@ -700,7 +700,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> uart_remove_one_port(&serial_m3110_reg, &max->port); free_page((unsigned long)max->con_xmit.buf); -@@ -810,13 +884,12 @@ static struct spi_driver uart_max3110_dr +@@ -811,13 +885,12 @@ static struct spi_driver uart_max3110_dr .owner = THIS_MODULE, }, .probe = serial_m3110_probe, @@ -716,7 +716,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { int ret = 0; -@@ -831,7 +904,7 @@ int __init serial_m3110_init(void) +@@ -832,7 +905,7 @@ int __init serial_m3110_init(void) return ret; } @@ -725,7 +725,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { spi_unregister_driver(&uart_max3110_driver); uart_unregister_driver(&serial_m3110_reg); -@@ -840,5 +913,5 @@ void __exit serial_m3110_exit(void) +@@ -841,5 +914,5 @@ void __exit serial_m3110_exit(void) module_init(serial_m3110_init); module_exit(serial_m3110_exit); |
