aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 16:41:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 16:41:04 -0500
commit21eaab6d19ed43e82ed39c8deb7f192134fb4a0e (patch)
treed995205afdcb7f47462bcd28067dc0c4ab0b7b02 /arch/alpha/kernel
parent74e1a2a39355b2d3ae8c60c78d8add162c6d7183 (diff)
parent9e17df37d710f8998e9cb10a548304fe33d4a5c2 (diff)
Merge tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial patches from Greg Kroah-Hartman: "Here's the big tty/serial driver patches for 3.9-rc1. More tty port rework and fixes from Jiri here, as well as lots of individual serial driver updates and fixes. All of these have been in the linux-next tree for a while." * tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits) tty: mxser: improve error handling in mxser_probe() and mxser_module_init() serial: imx: fix uninitialized variable warning serial: tegra: assume CONFIG_OF TTY: do not update atime/mtime on read/write lguest: select CONFIG_TTY to build properly. ARM defconfigs: add missing inclusions of linux/platform_device.h fb/exynos: include platform_device.h ARM: sa1100/assabet: include platform_device.h directly serial: imx: Fix recursive locking bug pps: Fix build breakage from decoupling pps from tty tty: Remove ancient hardpps() pps: Additional cleanups in uart_handle_dcd_change pps: Move timestamp read into PPS code proper pps: Don't crash the machine when exiting will do pps: Fix a use-after free bug when unregistering a source. pps: Use pps_lookup_dev to reduce ldisc coupling pps: Add pps_lookup_dev() function tty: serial: uartlite: Support uartlite on big and little endian systems tty: serial: uartlite: Fix sparse and checkpatch warnings serial/arc-uart: Miscll DT related updates (Grant's review comments) ... Fix up trivial conflicts, mostly just due to the TTY config option clashing with the EXPERIMENTAL removal.
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/srmcons.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 59b7bbad8394..6f01d9ad7b81 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -44,7 +44,7 @@ typedef union _srmcons_result {
44 44
45/* called with callback_lock held */ 45/* called with callback_lock held */
46static int 46static int
47srmcons_do_receive_chars(struct tty_struct *tty) 47srmcons_do_receive_chars(struct tty_port *port)
48{ 48{
49 srmcons_result result; 49 srmcons_result result;
50 int count = 0, loops = 0; 50 int count = 0, loops = 0;
@@ -52,13 +52,13 @@ srmcons_do_receive_chars(struct tty_struct *tty)
52 do { 52 do {
53 result.as_long = callback_getc(0); 53 result.as_long = callback_getc(0);
54 if (result.bits.status < 2) { 54 if (result.bits.status < 2) {
55 tty_insert_flip_char(tty, (char)result.bits.c, 0); 55 tty_insert_flip_char(port, (char)result.bits.c, 0);
56 count++; 56 count++;
57 } 57 }
58 } while((result.bits.status & 1) && (++loops < 10)); 58 } while((result.bits.status & 1) && (++loops < 10));
59 59
60 if (count) 60 if (count)
61 tty_schedule_flip(tty); 61 tty_schedule_flip(port);
62 62
63 return count; 63 return count;
64} 64}
@@ -73,7 +73,7 @@ srmcons_receive_chars(unsigned long data)
73 73
74 local_irq_save(flags); 74 local_irq_save(flags);
75 if (spin_trylock(&srmcons_callback_lock)) { 75 if (spin_trylock(&srmcons_callback_lock)) {
76 if (!srmcons_do_receive_chars(port->tty)) 76 if (!srmcons_do_receive_chars(port))
77 incr = 100; 77 incr = 100;
78 spin_unlock(&srmcons_callback_lock); 78 spin_unlock(&srmcons_callback_lock);
79 } 79 }
@@ -88,7 +88,7 @@ srmcons_receive_chars(unsigned long data)
88 88
89/* called with callback_lock held */ 89/* called with callback_lock held */
90static int 90static int
91srmcons_do_write(struct tty_struct *tty, const char *buf, int count) 91srmcons_do_write(struct tty_port *port, const char *buf, int count)
92{ 92{
93 static char str_cr[1] = "\r"; 93 static char str_cr[1] = "\r";
94 long c, remaining = count; 94 long c, remaining = count;
@@ -113,10 +113,10 @@ srmcons_do_write(struct tty_struct *tty, const char *buf, int count)
113 cur += result.bits.c; 113 cur += result.bits.c;
114 114
115 /* 115 /*
116 * Check for pending input iff a tty was provided 116 * Check for pending input iff a tty port was provided
117 */ 117 */
118 if (tty) 118 if (port)
119 srmcons_do_receive_chars(tty); 119 srmcons_do_receive_chars(port);
120 } 120 }
121 121
122 while (need_cr) { 122 while (need_cr) {
@@ -135,7 +135,7 @@ srmcons_write(struct tty_struct *tty,
135 unsigned long flags; 135 unsigned long flags;
136 136
137 spin_lock_irqsave(&srmcons_callback_lock, flags); 137 spin_lock_irqsave(&srmcons_callback_lock, flags);
138 srmcons_do_write(tty, (const char *) buf, count); 138 srmcons_do_write(tty->port, (const char *) buf, count);
139 spin_unlock_irqrestore(&srmcons_callback_lock, flags); 139 spin_unlock_irqrestore(&srmcons_callback_lock, flags);
140 140
141 return count; 141 return count;