From: Stefani Seibold on
User of the kernel fifo should never bypass the API and directly access
the fifo structure. Otherwise it will be very hard to maintain the API.

Signed-off-by: Stefani Seibold <stefani(a)seibold.net>
---
drivers/char/nozomi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -N -r -p linux-2.6.33-rc7.dummy/drivers/char/nozomi.c linux-2.6.33-rc7.new/drivers/char/nozomi.c
--- linux-2.6.33-rc7.dummy/drivers/char/nozomi.c 2010-02-11 17:05:50.670990421 +0100
+++ linux-2.6.33-rc7.new/drivers/char/nozomi.c 2010-02-11 17:11:20.350865181 +0100
@@ -1743,7 +1743,7 @@ static int ntty_write_room(struct tty_st
if (!port->port.count)
goto exit;

- room = port->fifo_ul.size - kfifo_len(&port->fifo_ul);
+ room = kfifo_avail(&port->fifo_ul);

exit:
mutex_unlock(&port->tty_sem);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/