aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2010-10-15 23:13:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-19 13:06:05 -0400
commita1768fbbd96ae1028cc3ffb56aebfa025087a677 (patch)
treedc52d3e9d0a2159ee582927627604655447fc389
parent16d355156ba475c0fefb19133174cdf61a5101ba (diff)
staging: speakup: selection.c style fixes
fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/speakup/selection.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c
index 1b865ff00bc..fe1f405d5d7 100644
--- a/drivers/staging/speakup/selection.c
+++ b/drivers/staging/speakup/selection.c
@@ -23,7 +23,8 @@ static char *sel_buffer;
23 23
24static unsigned char sel_pos(int n) 24static unsigned char sel_pos(int n)
25{ 25{
26 return inverse_translate(spk_sel_cons, screen_glyph(spk_sel_cons, n), 0); 26 return inverse_translate(spk_sel_cons,
27 screen_glyph(spk_sel_cons, n), 0);
27} 28}
28 29
29void speakup_clear_selection(void) 30void speakup_clear_selection(void)
@@ -34,7 +35,7 @@ void speakup_clear_selection(void)
34/* does screen address p correspond to character at LH/RH edge of screen? */ 35/* does screen address p correspond to character at LH/RH edge of screen? */
35static int atedge(const int p, int size_row) 36static int atedge(const int p, int size_row)
36{ 37{
37 return (!(p % size_row) || !((p + 2) % size_row)); 38 return !(p % size_row) || !((p + 2) % size_row);
38} 39}
39 40
40/* constrain v such that v <= u */ 41/* constrain v such that v <= u */
@@ -132,20 +133,15 @@ int speakup_paste_selection(struct tty_struct *tty)
132 set_current_state(TASK_INTERRUPTIBLE); 133 set_current_state(TASK_INTERRUPTIBLE);
133 if (test_bit(TTY_THROTTLED, &tty->flags)) { 134 if (test_bit(TTY_THROTTLED, &tty->flags)) {
134 if (in_atomic()) 135 if (in_atomic())
135 /* can't be performed in an interrupt handler, abort */ 136 /* if we are in an interrupt handler, abort */
136 break; 137 break;
137 schedule(); 138 schedule();
138 continue; 139 continue;
139 } 140 }
140 count = sel_buffer_lth - pasted; 141 count = sel_buffer_lth - pasted;
141 count = min_t(int, count, tty->receive_room); 142 count = min_t(int, count, tty->receive_room);
142#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) 143 tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted,
143 tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted, 0, count); 144 0, count);
144#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
145 tty->ldisc.ops->receive_buf(tty, sel_buffer + pasted, 0, count);
146#else
147 tty->ldisc.receive_buf(tty, sel_buffer + pasted, 0, count);
148#endif
149 pasted += count; 145 pasted += count;
150 } 146 }
151 remove_wait_queue(&vc->paste_wait, &wait); 147 remove_wait_queue(&vc->paste_wait, &wait);