Char: moxa, rework open/close
authorJiri Slaby <jirislaby@gmail.com>
Wed, 30 Apr 2008 07:53:45 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:43 +0000 (08:29 -0700)
commita8f5cda067e2eeefe49fe386caf0f61fc5c825e0
tree980c91f37b242ae9e6d7efa6cbb62f8550f3359c
parent2a5413416b6b2fd8a5a38601a4fe3b56a52cfb86
Char: moxa, rework open/close

- add locking to open/close/hangup and ioctl (tiocm)
- add pci hot-un-plug support (hangup on board remove, wait for openers)
- cleanup block_till_ready
- move close code common to close/hangup into separate function to be
  able to call it from open when hangup occurs while block_till_ready
- let ldisc flush on tty layer, it will do it after we return

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Oyvind Aabling <Oyvind.Aabling@uni-c.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/moxa.c