aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2006-12-08[PATCH] Char: sx, request regionsJiri Slaby2-6/+50
Check regions if they are free before we touch them. Release them in failpaths. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, use pci_iomapJiri Slaby1-12/+14
Use pci_ friends for memory remapping of pci devices. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, fix return in module initJiri Slaby1-0/+1
If pci_register_driver fails, but eisa_driver_register doesn't, we don't call misc_deregister, but returns error. Return OK in such cases. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, simplify timer logicJiri Slaby1-11/+4
Use kernel helpers for changing timer internals. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, whitespace cleanupJiri Slaby1-846/+976
Use Lindent to cleanup whitespace. Wrap long lines by hand. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, remove duplicite codeJiri Slaby1-15/+3
sx_remove_code contents were used twice. Call this function instead. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, lock boards structJiri Slaby1-14/+23
Fix race condition which may occurs when multiple cards are probed at the same time. Add mutex to critical sections to avoid this situation. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, ifdef ISA codeJiri Slaby1-6/+14
Most users won't need old probe code -- make it depndent on CONFIG_(E)ISA. Cc: <R.E.Wolff@BitWizard.nl> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, use eisa probingJiri Slaby1-47/+117
Instead of finding eisa directly, use eisa probing. Cc: <R.E.Wolff@BitWizard.nl> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, mark functions as devinitJiri Slaby1-4/+4
Mark as much as possible functions as __devinit to free them after driver initialization (if no hotplug). Cc: <R.E.Wolff@BitWizard.nl> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, use kcallocJiri Slaby1-13/+1
Convert self-implemented kzalloc to kernel kcalloc. Cc: <R.E.Wolff@BitWizard.nl> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: sx, convert to pci probingJiri Slaby1-78/+105
Convert old pci code to pci probing. Cc: <R.E.Wolff@BitWizard.nl> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, fix tty index checkJiri Slaby1-2/+2
Since tty->index is signed and may be < 0, we should assign this to int not uint. There is already a check to ensure if it is not negative, but gcc complains with -W flag enabled and it is perfectly correct: drivers/char/isicom.c:953: warning: comparison of unsigned expression < 0 is always false Fix this issue by converting `line' variable from uint to int. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, remove cvs stuffJiri Slaby1-5/+2
We don't need RCS_ID & co. Extract them from the code and define only one macro -- SX_VERSION. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, simplify timerJiri Slaby1-14/+4
Don't init timer in such complicated way. Use DEFINE_TIMER and then only mod_timer to reset the expiration. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, use completionJiri Slaby1-5/+3
Use wait_for_completion+complete instead of variables+msleep hack. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, check kmalloc retvalJiri Slaby1-0/+5
Value returned from kamlloc may be NULL, we should check if ENOMEM occured. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, use pci_request_regionJiri Slaby1-3/+4
Use pci_request_region in pci probing function instead of request_region. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, move to tty_register_deviceJiri Slaby1-1/+12
Instead of registering all devices in register_tty_driver, register devices in probe function and register only port_count devices. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, remove unneeded memsetJiri Slaby1-1/+0
Memsetting of global static variables is not needed in the init code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, remove isa codeJiri Slaby1-70/+21
ISA is not supported by this driver, remove parts, that take care of this. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, rename init functionJiri Slaby1-2/+2
Rename init function from setup to init and mark it as __init, not __devinit. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: isicom, expand functionJiri Slaby1-107/+44
Simple functions (those, that calls reuest_irq, request_region et al) may be expanded directly in code. It makes probe function more readable and transparent. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] termios: Enable new style termios ioctls on x86-64Alan Cox3-3/+23
This turns on the split input/output speed features and arbitary baud rate handling for the x86-64 platform. Nothing should break if you use existing standard speeds. If you use the new speed stuff then you may see some drivers failing to report the speed changes properly in error cases. This will be worked on further. For the working cases this all seems happy. I'll post a test suite used to test the basic stuff as well. Patches for i386 will follow when I get a moment but are basically the same. If people could patch/test-suite other architectures and submit them that would be great. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] tty_ioctl: use termios for the old structure and termios2 for the newAlan Cox1-7/+11
Having split out the user and kernel structures it turns out that some non glibc C libraries pull their termios struct from the kernel headers directly or indirectly. This means we must keep "struct termios" as the library sees it correct for the old ioctls. Not a big problem just shuffle the names and ifdef around a bit [akpm@osdl.org: build fix] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] tty: switch to ktermiosAlan Cox113-253/+301
This is the grungy swap all the occurrences in the right places patch that goes with the updates. At this point we have the same functionality as before (except that sgttyb() returns speeds not zero) and are ready to begin turning new stuff on providing nobody reports lots of bugs If you are a tty driver author converting an out of tree driver the only impact should be termios->ktermios name changes for the speed/property setting functions from your upper layers. If you are implementing your own TCGETS function before then your driver was broken already and its about to get a whole lot more painful for you so please fix it 8) Also fill in c_ispeed/ospeed on init for most devices, although the current code will do this for you anyway but I'd like eventually to lose that extra paranoia [akpm@osdl.org: bluetooth fix] [mp3@de.ibm.com: sclp fix] [mp3@de.ibm.com: warning fix for tty3270] [hugh@veritas.com: fix tty_ioctl powerpc build] [jdike@addtoit.com: uml: fix ->set_termios declaration] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Martin Peschke <mp3@de.ibm.com> Acked-by: Peter Oberparleiter <oberpar@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] tty: switch to ktermios and new frameworkAlan Cox7-127/+297
This is the core of the switch to the new framework. I've split it from the driver patches which are mostly search/replace and would encourage people to give this one a good hard stare. The references to BOTHER and ISHIFT are the termios values that must be defined by a platform once it wants to turn on "new style" ioctl support. The code patches here ensure that providing 1. The termios overlays the ktermios in memory 2. The only new kernel only fields are c_ispeed/c_ospeed (or none) the existing behaviour is retained. This is true for the patches at this point in time. Future patches will define BOTHER, ISHIFT and enable newer termios structures for each architecture, and once they are all done some of the ifdefs also vanish. [akpm@osdl.org: warning fix] [akpm@osdl.org: IRDA fix] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] tty: preparatory structures for termios revampAlan Cox21-1/+229
In order to sort out our struct termios and add proper speed control we need to separate the kernel and user termios structures. Glibc is fine but the other libraries rely on the kernel exported struct termios and we need to extend this without breaking the ABI/API To do so we add a struct ktermios which is the kernel view of a termios structure and overlaps the struct termios with extra fields on the end for now. (That limitation will go away in later patches). Some platforms (eg alpha) planned ahead and thus use the same struct for both, others did not. This just adds the structures but does not use them, it seems a sensible splitting point for bisect if there are compile failures (not that I expect them) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, remove many prototypesJiri Slaby1-131/+91
Many prototypes are useless, since functions are declared before they are called. Also some code was easy to move to resolve this dependency and delete prototypes. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, mark functions as initJiri Slaby1-8/+8
Use __init macro for functions, that may be freed after initialization. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, uninline functionsJiri Slaby1-19/+9
- Do not inline such long functions, it won't speed up anything. - Remove prototypes of these functions. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, move init/deinitJiri Slaby1-136/+120
- Move code from stl_init into module init function, because calling it was the only one thing, that it did. - Move this code to the end of the driver (usual place for this) to resolve dependencies simply -- without prototypes. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, kill typedefsJiri Slaby2-243/+239
Typedefs are considered ugly in the kernel. Eliminate them. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, remove unneeded castsJiri Slaby1-136/+136
casts of NULL are unnecessary. And so casts to (void *) are. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: stallion, use pr_debug macroJiri Slaby1-237/+86
Use pr_debug kernel macro instead of #ifdef DEBUG | printk() | #endif Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] mxser-workqueue-fixesAndrew Morton1-3/+3
Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] mxser_new: correct tty driver nameJiri Slaby1-1/+1
Mxser tty driver name should be ttyMI, not ttyM. Correct this in mxser_new to avoid conflicts with isicom driver, which is ttyM. Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] isicom, mxser MAINTAINERS updateJiri Slaby1-0/+12
I can maintain moxa and isicom char drivers, because I've rewritten them to the new API. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, clean macrosJiri Slaby1-10/+2
Celan redundant macros. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, pci probingJiri Slaby1-87/+88
Finally, the intention of the patch serie: PCI probing for this driver. add pci_driver structure, (un)register it and add some stuff, which this needs. Remove pdev pointer from board structure, because it's no longer needed. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, delete ttys and termiosJiri Slaby1-6/+0
- Driver uses global tty_struct array, which tries to assign to the tty_driver's ttys. - the very same thing for termios - the same for termios_locked Kill such constructions. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, correct intr handler protoJiri Slaby1-1/+1
Prototype of the driver's interrupt handler is old-fashioned, past changes tell us, we won't get pt_regs as the 3rd argument. There are only 2 params. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, comments cleanupJiri Slaby1-127/+16
mxser_new, comments cleanup - Remove commented code, since we have version control. - Remove comments containing "following added by..." and "above added by,..". It's useless. - Align other comments. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, reverse if-else-paths patchJiri Slaby1-20/+7
This patch was intorduced in mxser to 1.9.1 conversion, but causes endless sleep in tcdrain userspace call. Thanks to Sergei Organov <osv@javad.com> for testing and pointing this out. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, compact structures, round2Jiri Slaby1-167/+109
Too many structures are in the driver for each type of card. Make only one for all cards and appropriate alter the code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, register tty devices on the flyJiri Slaby1-11/+27
Register tty indexes only for real devices, udev then creates nodes for them (and only for them). Move tty_register_driver before probing, to be correct when calling tty_register_device. Also tell tty layer by tty_driver flags, that we are registering devices. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, compress isa findingJiri Slaby1-69/+40
ISA cards finding was too complex -- 2 (module params + predefined) absolutely same routines, join them together with one for loop, one if and one indent level. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, don't check tty_unregister retvalJiri Slaby1-6/+3
Like other drivers silently unregister_tty_driver and put_tty_driver. It shouldn't be busy when module release function is called, since we are not bsd, no refs shouldn't be held. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, correct fail pathsJiri Slaby1-25/+24
Resources were not released in some fail paths. Correct this behaviour by implementing function and calling it when something fails. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] Char: mxser_new, testbit for bit testingJiri Slaby1-7/+8
Use testbit like in tty subsystem for TTY_IO_ERROR testing. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>