summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Yungmann <yungmann.chris@gmail.com>2012-06-13 12:39:55 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-13 12:20:16 -0700
commite888fabd10cdd46a4b46bcc029c5c6d2364dab7f (patch)
tree4aff5a19332ff345961e018ac7e8409f2b178921
parenta2c49a9ac993fa2b4795890d5fa56f2fc002453e (diff)
downloadlinux-e888fabd10cdd46a4b46bcc029c5c6d2364dab7f.tar.gz
linux-e888fabd10cdd46a4b46bcc029c5c6d2364dab7f.tar.bz2
linux-e888fabd10cdd46a4b46bcc029c5c6d2364dab7f.zip
staging: speakup: fixed checkpatch and sparse warnings in selection.c
Signed-off-by: Chris Yungmann <yungmann.chris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/speakup/selection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/speakup/selection.c b/drivers/staging/speakup/selection.c
index fe1f405d5d70..0612df06a4bf 100644
--- a/drivers/staging/speakup/selection.c
+++ b/drivers/staging/speakup/selection.c
@@ -68,7 +68,7 @@ int speakup_set_selection(struct tty_struct *tty)
if (spk_sel_cons != vc_cons[fg_console].d) {
speakup_clear_selection();
spk_sel_cons = vc_cons[fg_console].d;
- printk(KERN_WARNING
+ dev_warn(tty->dev,
"Selection: mark console not the same as cut\n");
return -EINVAL;
}
@@ -95,7 +95,7 @@ int speakup_set_selection(struct tty_struct *tty)
/* Allocate a new buffer before freeing the old one ... */
bp = kmalloc((sel_end-sel_start)/2+1, GFP_ATOMIC);
if (!bp) {
- printk(KERN_WARNING "selection: kmalloc() failed\n");
+ dev_warn(tty->dev, "selection: kmalloc() failed\n");
speakup_clear_selection();
return -ENOMEM;
}
@@ -141,7 +141,7 @@ int speakup_paste_selection(struct tty_struct *tty)
count = sel_buffer_lth - pasted;
count = min_t(int, count, tty->receive_room);
tty->ldisc->ops->receive_buf(tty, sel_buffer + pasted,
- 0, count);
+ NULL, count);
pasted += count;
}
remove_wait_queue(&vc->paste_wait, &wait);