I wrote a simple serial program to test tty routines.
It just writes a simple text to serial port "/dev/ttyS1".

The open routine succeeded, which finally called serial8250_startup() in
kernel, but write routine did not call the kernel routine "tty_write()"
for /dev/ttyS1.So, it did not call uart_write(), either.

echo test > /dev/ttyS1 is OK.
tty_write() and uart_write() are all normally called.

Please tell what is wrong with my simple test routine.
The routine was like this:

Just about everything is wrong.
At first you should check the return value from fopen().
Here is a simple serial program that works, and actually initialises the serial device,
simpler then this is not easy:
[url]http://panteltje.com/panteltje/pic/io_pic/ptlrc-0.2.tgz[/url]