Jiri Slaby
c2ad4c7515
Char: cyclades, use IS_CYC_Z macro
...
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 >
2007-05-08 11:15:24 -07:00
Jiri Slaby
73b52572ab
Char: isicom, use pr_debug
...
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 >
2007-05-08 11:15:24 -07:00
Jiri Slaby
f1e83c6c1e
Char: cyclades, allow DEBUG_SHIRQ
...
Test if base addr is non-null in ISR to prove the card has been correctly
initialized. This is needed for DEBUG_SHIRQ for example.
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 >
2007-05-08 11:15:24 -07:00
Jiri Slaby
85c93fa95b
Char: cyclades, clear interrupts before releasing
...
Without this patch, the driver sometimes causes "IRQXX: Nobody cares". Fix it
by turning off irqs when releasing.
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 >
2007-05-08 11:15:24 -07:00
Jiri Slaby
6ad1ccc196
Char: cyclades, tty_register_device separately for each device
...
Do not register all tty devices at the init time, delay it for the time until
some device is found.
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 >
2007-05-08 11:15:24 -07:00
Jiri Slaby
9dacf3b2f0
Char: cyclades, cy_init error handling
...
- do not panic if tty_register_driver fails
- handle fail paths properly
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
14a55a6789
Char: cyclades, remove some global vars
...
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
f3851e73ec
Char: cyclades, init card struct immediately
...
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
0809e2671d
Char: cyclades, move card entries init into function
...
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
58936d8d94
Char: cyclades, create cy_pci_probe
...
Move probing code to separate function for easy pci probing conversion.
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
2b1da41fb3
Char: cyclades, init Ze immediately
...
There will be no other choice after introducing pci probing anyway.
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
38d0909325
Char: cyclades, use pci_iomap/unmap
...
fork remove code for pci -- move it to separate, new, function and don't care
about pci in the former.
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
d407c78188
Char: cyclades, create cy_init_Ze
...
Move Ze init code into new cy_init_Ze, because we will need it in another
place and it will make the code totally unreadable.
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
cab9bdd14d
Char: cyclades, remove useless casts
...
cyclades, remove useless casts
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 >
2007-05-08 11:15:23 -07:00
Jiri Slaby
ad39c30049
Char: cyclades, remove volatiles
...
cyclades, remove volatiles
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 >
2007-05-08 11:15:22 -07:00
Jiri Slaby
b70509066c
Char: cyclades, timer cleanup
...
cyclades, timer cleanup
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 >
2007-05-08 11:15:22 -07:00
Jiri Slaby
db05c3b1dd
Char: cyclades, cy_readX/writeX cleanup
...
cyclades, cy_readX/writeX cleanup
- cy_readX are placeholders for readX, remove it
- move cy_writeX macros into do {} while(0) to be safe
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 >
2007-05-08 11:15:22 -07:00
Jiri Slaby
ffa68e79ff
Char: cyclades, remove PAUSE
...
cyclades, remove PAUSE
PAUSE expands to do {} while (0), it's useless.
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 >
2007-05-08 11:15:22 -07:00
Adrian Bunk
79df3c19aa
no longer #include <asm/kdebug.h>
...
Include the new linux/kdebug.h instead of asm/kdebug.h.
Simply remove the asm/kdebug.h include if both had been included.
Signed-off-by: Adrian Bunk <bunk@stusta.de >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:20 -07:00
Matthias Kaehlcke
0e82d5b618
use mutex instead of semaphore for misc char devices
...
The misc character device driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:15 -07:00
Matthias Kaehlcke
d081d47044
use mutex instead of semaphore in TPM driver
...
The TPM driver uses two semaphores as mutexes. Use the mutex API instead of
the (binary) semaphores.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com >
Cc: Kylene Hall <kjhall@us.ibm.com >
Cc: Marcel Selhorst <tpm@selhorst.net >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:15 -07:00
Matthias Kaehlcke
69f545ea6a
use mutex instead of semaphore in RocketPort driver
...
The RocketPort driver uses a semaphore as mutex. Use the mutex API instead of
the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:15 -07:00
Paul Fulghum
62eb5b1f3b
synclink_gt use dynamic tty device registration
...
Change synclink_gt driver to use dynamic tty device registration.
Signed-off-by: Paul Fulghum <paulkf@microgate.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:15 -07:00
dann frazier
a2f72982e2
old buffer overflow in moxa driver
...
I noticed that the moxa input checking security bug described by
CVE-2005-0504 appears to remain unfixed upstream.
The issue is described here:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0504
Debian has been shipping the following patch from Andres Salomon.
(akpm: it's a privileged operation)
Signed-off-by: dann frazier <dannf@hp.com >
Signed-off-by: Andres Salomon <dilinger@debian.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:14 -07:00
Parag Warudkar
8e39c933b1
tpm: fix sleep-in-spinlock
...
flush_scheduled_work() can sleep, and we're calling it under spinlock.
AFAICS, moving flush_scheduled_work before spin_lock() should not cause any
problems.
Reason being - The only thing that can race against tpm_release is tpm_open
(tpm_release is called when last reference to the file is closed and only
thing that can happen after that is tpm_open??) and tpm_open acquires
driver_lock and more over it bails out with EBUSY if chip->num_opens is
greater than 0.
I also moved chip->num_pending-- to after deleting timer and setting data
pending as it looks more correct for the paranoid although it probably doesn't
matter as it is guarded by driver_lock. None the less this change should not
cause problems.
While I was at it I noticed a missing NULL check in tpm_register_hardware
which is fixed with this patch as well.
Signed-off-by: Parag Warudkar <parag.warudkar@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-05-08 11:15:13 -07:00