Fix the (i)Stallion driver's putchar() and break_ctl() ops
authorDavid Howells <dhowells@redhat.com>
Tue, 22 Jul 2008 10:18:43 +0000 (11:18 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Jul 2008 20:03:28 +0000 (13:03 -0700)
commit4a56122297ac7a4a3bf09fb66c0a365a13abe707
tree2b748f15c805c3e6e8e5cb6a349e807edf52d909
parent781cff5cb2bc8d714270accf88db23a855de9816
Fix the (i)Stallion driver's putchar() and break_ctl() ops

Fix the Stallion driver's putchar() and break_ctl() ops and iStallion's
putchar() to return values.

Is it actually possible for putchar() or break_ctl() to be called with tty ==
NULL or can the check be discarded?

Should stl_write() be returning 0 if tty->driver_data is NULL or tx.buf is
NULL?  Is this even possible?

I've made Stallion's functions return -EINVAL as stli_breakctl() if the checks
fail.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/stallion.c