aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorStefani Seibold <stefani@seibold.net>2009-12-21 17:37:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 17:17:56 -0500
commit7acd72eb85f1c7a15e8b5eb554994949241737f1 (patch)
tree76712bb9f38690d8cf9c2f91bef811e4413d1aa3 /drivers/char
parente64c026dd09b73faf20707711402fc5ed55a8e70 (diff)
kfifo: rename kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out...
rename kfifo_put... into kfifo_in... to prevent miss use of old non in kernel-tree drivers ditto for kfifo_get... -> kfifo_out... Improve the prototypes of kfifo_in and kfifo_out to make the kerneldoc annotations more readable. Add mini "howto porting to the new API" in kfifo.h Signed-off-by: Stefani Seibold <stefani@seibold.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Andi Kleen <ak@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/nozomi.c4
-rw-r--r--drivers/char/sonypi.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 61f5bfe74f38..9ef243429014 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -798,7 +798,7 @@ static int send_data(enum port_type index, struct nozomi *dc)
798 struct tty_struct *tty = tty_port_tty_get(&port->port); 798 struct tty_struct *tty = tty_port_tty_get(&port->port);
799 799
800 /* Get data from tty and place in buf for now */ 800 /* Get data from tty and place in buf for now */
801 size = kfifo_get(&port->fifo_ul, dc->send_buf, 801 size = kfifo_out(&port->fifo_ul, dc->send_buf,
802 ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX); 802 ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX);
803 803
804 if (size == 0) { 804 if (size == 0) {
@@ -1672,7 +1672,7 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
1672 goto exit; 1672 goto exit;
1673 } 1673 }
1674 1674
1675 rval = kfifo_put(&port->fifo_ul, (unsigned char *)buffer, count); 1675 rval = kfifo_in(&port->fifo_ul, (unsigned char *)buffer, count);
1676 1676
1677 /* notify card */ 1677 /* notify card */
1678 if (unlikely(dc == NULL)) { 1678 if (unlikely(dc == NULL)) {
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index dbcb3bd192c7..0798754a607c 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -777,7 +777,7 @@ static void input_keyrelease(struct work_struct *work)
777{ 777{
778 struct sonypi_keypress kp; 778 struct sonypi_keypress kp;
779 779
780 while (kfifo_get_locked(&sonypi_device.input_fifo, (unsigned char *)&kp, 780 while (kfifo_out_locked(&sonypi_device.input_fifo, (unsigned char *)&kp,
781 sizeof(kp), &sonypi_device.input_fifo_lock) 781 sizeof(kp), &sonypi_device.input_fifo_lock)
782 == sizeof(kp)) { 782 == sizeof(kp)) {
783 msleep(10); 783 msleep(10);
@@ -828,7 +828,7 @@ static void sonypi_report_input_event(u8 event)
828 if (kp.dev) { 828 if (kp.dev) {
829 input_report_key(kp.dev, kp.key, 1); 829 input_report_key(kp.dev, kp.key, 1);
830 input_sync(kp.dev); 830 input_sync(kp.dev);
831 kfifo_put_locked(&sonypi_device.input_fifo, 831 kfifo_in_locked(&sonypi_device.input_fifo,
832 (unsigned char *)&kp, sizeof(kp), 832 (unsigned char *)&kp, sizeof(kp),
833 &sonypi_device.input_fifo_lock); 833 &sonypi_device.input_fifo_lock);
834 schedule_work(&sonypi_device.input_work); 834 schedule_work(&sonypi_device.input_work);
@@ -882,7 +882,7 @@ found:
882 acpi_bus_generate_proc_event(sonypi_acpi_device, 1, event); 882 acpi_bus_generate_proc_event(sonypi_acpi_device, 1, event);
883#endif 883#endif
884 884
885 kfifo_put_locked(&sonypi_device.fifo, (unsigned char *)&event, 885 kfifo_in_locked(&sonypi_device.fifo, (unsigned char *)&event,
886 sizeof(event), &sonypi_device.fifo_lock); 886 sizeof(event), &sonypi_device.fifo_lock);
887 kill_fasync(&sonypi_device.fifo_async, SIGIO, POLL_IN); 887 kill_fasync(&sonypi_device.fifo_async, SIGIO, POLL_IN);
888 wake_up_interruptible(&sonypi_device.fifo_proc_list); 888 wake_up_interruptible(&sonypi_device.fifo_proc_list);
@@ -932,7 +932,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
932 return ret; 932 return ret;
933 933
934 while (ret < count && 934 while (ret < count &&
935 (kfifo_get_locked(&sonypi_device.fifo, &c, sizeof(c), 935 (kfifo_out_locked(&sonypi_device.fifo, &c, sizeof(c),
936 &sonypi_device.fifo_lock) == sizeof(c))) { 936 &sonypi_device.fifo_lock) == sizeof(c))) {
937 if (put_user(c, buf++)) 937 if (put_user(c, buf++))
938 return -EFAULT; 938 return -EFAULT;