aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
Commit message (Collapse)AuthorAgeFilesLines
* isicom: kill off the BKLAlan Cox2010-08-101-8/+5
| | | | | | | | | | As with the others we can use the port mutex to get the needed locking properties and fix the race with open. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* serial: isicomm: handle running out of slotsDan Carpenter2010-05-211-1/+7
| | | | | | | | | | This patch makes it return -ENODEV if we run out of empty slots in the probe function. It's unlikely to happen, but it makes the static checkers happy. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: Fix regressions in the char driver conversionAlan Cox2010-04-301-2/+7
| | | | | | | | | | | | | This forgot to update a field in the old char drivers. The fact nobody has basically noticed (except one mxser user) rather suggests most of these drivers could go into the bitbucket. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Cc: Andreas Pretzsch <apr@cn-eng.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* tty: declare MODULE_FIRMWARE in various driversBen Hutchings2010-03-021-0/+5
| | | | | | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* serial: isicom.c: use pr_fmt and pr_<level>Joe Perches2010-03-021-23/+26
| | | | | | | | | | | | | | Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Convert printks to pr_<level> Convert some embedded function names to %s...__func__ Remove a period after exclamation points. Remove #define pr_dbg which could be used by future kernel.h includes Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: isicom: fix deadlock on shutdownAlan Cox2009-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexander Strakh <strakh@ispras.ru> reported KERNEL_VERSION: 2.6.31 DESCRIBE: Driver drivers/char/isicom.c might sleep in atomic context, because it calls tty_port_xmit_buf under spin_lock. ./drivers/char/isicom.c: 1307 static void isicom_hangup(struct tty_struct *tty) 1308 { ... 1315 spin_lock_irqsave(&port->card->card_lock, flags); 1316 isicom_shutdown_port(port); ... Path to might_sleep macro from isicom_hangup: 1. isicom_hangup calls spin_lock_irqsave (drivers/char/isicom.c:1315) and then calls isicom_shutdown_port. 2. isiscom_shutdown_port calls tty_port_free_xmit_buf at drivers/char/isicom.c:906 3. tty_port_free_xmit_buf calls mutex_lock at drivers/char/tty_port:48 Found by Linux Driver Verification Project. Reported-by: Alexander Strakh <strakh@ispras.ru> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: isicom: sort out the board init logicAlan Cox2009-12-111-30/+11
| | | | | | | | | Split this into two flags - INIT meaning the board is set up and ACTIVE meaning the board has ports open. Remove the broken HUPCL casing and push the counts somewhere sensible. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: isicom: switch to the new tty_port_open helperAlan Cox2009-12-111-67/+21
| | | | | | | | Trivial conversion in this case so might as well do it while testing the port_open design is right Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* isicom: split the open method for the isicom deviceAlan Cox2009-09-191-8/+24
| | | | | | Again moving towards being able to add a common open method Signed-off-by: Alan Cox <alan@linux.intel.com>
* isicom: Split the close hardware bits outAlan Cox2009-09-191-11/+14
| | | | | | Start to extract and build a model for a common tty_port_close() Signed-off-by: Alan Cox <alan@linux.intel.com>
* headers: smp_lock.h reduxAlexey Dobriyan2009-07-121-0/+1
| | | | | | | | | | | | | * Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Remove multiple KERN_ prefixes from printk formatsJoe Perches2009-07-081-8/+8
| | | | | | | | | | | | | | Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up handling of log-levels and newlines") changed printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch. <level> is now included in the output on each additional use. Remove all uses of multiple KERN_<level>s in formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Char: isicom: fix build warningJiri Slaby2009-06-181-1/+1
| | | | | | | | | | | | | Fix this: isicom.c: In function `isicom_probe': isicom.c:1587: warning: `signature' may be used uninitialized in this function by uninitialized_var(), because if the signature is not initialized in reset_card(), we won't use it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Add carrier processing on close to the tty_port coreAlan Cox2009-06-111-6/+13
| | | | | | | | | | | | | | Some drivers implement this internally, others miss it out. Push the behaviour into the core code as that way everyone will do it consistently. Update the dtr rts method to raise or lower depending upon flags. Having a single method in this style fits most of the implementations more cleanly than two funtions. We need this in place before we tackle the USB side Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: isicom kref leak fixAlan Cox2009-04-061-0/+1
| | | | | | | | The isicom driver leaks a kref on the shutdown path. Drop the additional kref we took Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Introduce some close helpers for portsAlan Cox2009-01-021-56/+10
| | | | | | | Again this is a lot of common code we can unify Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Introduce a tty_port generic block_til_readyAlan Cox2009-01-021-77/+2
| | | | | | | | Start sucking more commonality out of the drivers into a single piece of core code. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: redo locking to use tty port locksAlan Cox2009-01-021-20/+15
| | | | | | | | This helps set the basis for moving block_til_ready into common code. We also introduce a tty_port_hangup helper as this will also be generally needed. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Pull the dtr raise into tty portAlan Cox2009-01-021-5/+8
| | | | | | | | This moves another per device special out of what should be shared open wait paths into private methods Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty_port: Add a port level carrier detect operationAlan Cox2009-01-021-19/+32
| | | | | | | | This is the first step to generalising the various pieces of waiting logic duplicated in all sorts of serial drivers. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: trivial - fix up email addresses in tty related stuffAlan Cox2008-11-111-2/+4
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: kref usage for isicom and moxaAlan Cox2008-10-131-30/+31
| | | | | | | | | | Rather than blindly keep taking krefs we reorder the code in a few places to pass the tty down to the right place (which is important as from the user side it is not the case that tty == port->tty in all situations). For the irq and related paths use the krefs to stop the tty being freed under us. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: restore using hardware break supportAlan Cox2008-07-221-21/+9
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: add more tty_port fieldsAlan Cox2008-07-201-15/+13
| | | | | | | Move more bits into the tty_port structure Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: use tty_portAlan Cox2008-07-201-102/+79
| | | | | | | Switch isicom to use a tty_port structure for some fields Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: isicom, enable/disable pci deviceJiri Slaby2008-07-201-0/+8
| | | | | | | | | | Don't forget to enable and disable PCI devices. The device might be unusable without that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: fix buffer allocationAlan Cox2008-04-301-8/+6
| | | | | | | | | | Fix the rather strange buffer management on open that turned up while auditing for BKL dependencies. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: The big operations reworkAlan Cox2008-04-301-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Operations are now a shared const function block as with most other Linux objects - Introduce wrappers for some optional functions to get consistent behaviour - Wrap put_char which used to be patched by the tty layer - Document which functions are needed/optional - Make put_char report success/fail - Cache the driver->ops pointer in the tty as tty->ops - Remove various surplus lock calls we no longer need - Remove proc_write method as noted by Alexey Dobriyan - Introduce some missing sanity checks where certain driver/ldisc combinations would oops as they didn't check needed methods were present [akpm@linux-foundation.org: fix fs/compat_ioctl.c build] [akpm@linux-foundation.org: fix isicom] [akpm@linux-foundation.org: fix arch/ia64/hp/sim/simserial.c build] [akpm@linux-foundation.org: fix kgdb] Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: bring into coding styleAlan Cox2008-04-301-53/+56
| | | | | | | | [akpm@linux-foundation.org: fix arm, cleanups] Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty/serial: lay the foundations for the next set of reworksAlan Cox2008-04-301-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | - Stop drivers calling their own flush method indirectly, it obfuscates code and it will change soon anyway - A few more lock_kernel paths temporarily needed in some driver internal waiting code - Remove private put_char method that does a write call for one char - we have that anyway - Most but not yet all of the termios copy under lock fixing (some has other dependencies to follow) - Note a few locking bugs in drivers found in the process - Kill remaining [ab]users of TIOCG/SSOFTCAR in the driver, these must go to fix the termios locking Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* isicom: prepare for lock_kernel push downAlan Cox2008-04-301-14/+8
| | | | | | | | | Again lock the bits we can't trivially prove are safe without the BKL and remove the broken TIOCS/GSOFTCAR handler. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/char/isicom.c: correct use of ! and &Julia Lawall2008-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337 ("wmi: (!x & y) strikes again"), a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add missing newlines to some uses of dev_<level> messagesJoe Perches2007-10-181-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found these while looking at printk uses. Add missing newlines to dev_<level> uses Add missing KERN_<level> prefixes to multiline dev_<level>s Fixed a wierd->weird spelling typo Added a newline to a printk Signed-off-by: Joe Perches <joe@perches.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Tilman Schmidt <tilman@imap.cc> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Smart <James.Smart@Emulex.Com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Char: isicom, proper variables typesJiri Slaby2007-07-171-11/+7
| | | | | | | | irq is int, base is unsigned long Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Char: isicom, del_timer at exitJiri Slaby2007-07-171-11/+1
| | | | | | Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Char: isicom, cleanup lockingJiri Slaby2007-07-171-38/+27
| | | | | | | | | | Don't spin processor when not needed (use sleep instead of delay). Don't release the lock when needed in next iteration -- this actually fixes a bug -- missing braces Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Char: isicom, use pr_debugJiri Slaby2007-05-081-2/+1
| | | | | | | | isicom, use pr_debug Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: tty_wakeup cleanupJiri Slaby2007-02-111-1/+0
| | | | | | | | | | | | | | tty_wakeup cleanup - remove wake_up_interruptible(&tty->write_wait) surrounding tty_wakup(tty); - substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty); Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, correct probing/removingJiri Slaby2007-02-111-7/+9
| | | | | | | | | | Don't forget to decrease card_count in fail paths and in remove function. Also null board->base in such cases to point out, that this structure is unused and thus can be reassigned. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, support higher ratesJiri Slaby2007-02-111-2/+7
| | | | | | | | Add support for higher baud rates (coming from original isi driver). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, check card state in isrJiri Slaby2007-02-111-0/+5
| | | | | | | | | Check if the card really interrupted us by reading its IO space and eventualy return IRQ_NONE. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, augment card_resetJiri Slaby2007-02-111-17/+22
| | | | | | | | | | | | | isicom, augment card_reset - add 0xee to signatures - change long delays to sleeps - make one sleep shorter not to wait 3s - portcount == 16 is also correct Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, fix locking in isrJiri Slaby2007-02-111-0/+2
| | | | | | | | | 2 spin_unlocks are omitted in the interrupt handler. Put them there to fix up deadlocking on UP. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, remove tty_{hang,wake}up bottomhalvesJiri Slaby2007-02-111-33/+3
| | | | | | | | | | | | | - tty_hangup() itself schedules work, so there is no need to schedule hangup in the driver - tty_wakeup(): it's safe to call it while in atomic, so that its schedule_work might be also wiped out Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] Char: isicom, eliminate spinlock recursionJiri Slaby2006-12-301-52/+51
| | | | | | | | Many spinlock recursion was in the isicom driver. Eliminate it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Char: isicom, fix tty index checkJiri Slaby2006-12-081-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>
* [PATCH] Char: isicom, simplify timerJiri Slaby2006-12-081-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>
* [PATCH] Char: isicom, use completionJiri Slaby2006-12-081-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>
* [PATCH] Char: isicom, check kmalloc retvalJiri Slaby2006-12-081-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>