aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/cyclades.c
AgeCommit message (Collapse)Author
2007-10-23Char: cyclades, fix potential NULL dereferenceJiri Slaby
ztxdone is jumped to even if tty is NULL and tty_wakeup placed after this label doesn't expect NULLed parameter, so this will cause an oops in some situations (why they scheduled a wakeup there before remove bottom half processing patch?). wakeup only in the case when we have non-null tty struct. Spotted by Adrian Bunk. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-20Documentation: Remove references to dead "cyclades=" boot optionRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Convert files to UTF-8 and some cleanupsJan Engelhardt
* Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-18Cyclades: Avoid label defined but not used warningJesper Juhl
CC drivers/char/cyclades.o drivers/char/cyclades.c: In function 'cy_init': drivers/char/cyclades.c:5488: warning: label 'err_unr' defined but not used Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-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-10-18Char: cyclades, fix some -W warningsJiri Slaby
Most of them are signedness, the rest unused function parameters. 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-10-18Char: cyclades, move spin_lock to one placeJiri Slaby
Lock whole processing in isr, avoid error-prone locking/unlocking in rx/tx esp. On fail paths (there was a bug in the past yet). 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-10-18Char: cyclades, make the isr code readableJiri Slaby
Due to large indent the code was wrapped and unreadable. Create 3 function instead of one and reorder the code, so it is readable now. 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-10-18Char: cyclades, remove bottom half processingJiri Slaby
The work done in bottom half doesn't cost much cpu time (e.g. tty_hangup itself schedules its own bottom half), it's possible to do the work in isr directly and save hence some .text. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17drivers/*: mark variables with uninitialized_var()Jeff Garzik
Mark variables in drivers/* with uninitialized_var() if such a warning appears, and analysis proves that the var is initialized properly on all paths it is used. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17Char: cyclades, fix sparse warningJiri Slaby
cyclades, fix sparse warning 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-07-17Char: cyclades, add firmware loadingJiri Slaby
cyclades, add firmware loading 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-07-16serial: remove termios checks from various old char serial driversAlan Cox
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>
2007-05-23Char: cyclades, fix deadlockJiri Slaby
An omitted unlock. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08Char: cyclades, copyright and version changesJiri Slaby
- add copyright - move version one number upper and use MODULE_VERSION 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-08Char: cyclades, probe cleanupJiri Slaby
- add fail paths - merge 3 similar initializations into one (Z, Ze, Y) [akpm@linux-foundation.org: build fix] 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-08Char: cyclades, dynamic portsJiri Slaby
and save thus approx. 160k of .bss 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-08Char: cyclades, fix tty device unregisterJiri Slaby
put_tty_driver after unregistering devices 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-08Char: cyclades, conditions cleanupJiri Slaby
- 0 is not NULL - use unlikely to hit the icache in isr more likely - remove or comment empty if/else paths [akpm@linux-foundation.org: build fix] 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-08Char: cyclades, remove locking macrosJiri Slaby
and use locally stored card structure if possible 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-08Char: cyclades, remove unused timestampsJiri Slaby
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-08Char: cyclades, timers cleanupJiri Slaby
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-08Char: cyclades, fix blockmoveJiri Slaby
tty has no longer flip buffers accessible externally. Fix it by moving the code to the tty_*flip* helpers. 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-08Char: cyclades, remove sleep_onJiri Slaby
convert to wait_* and completion 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-08Char: cyclades, make info->card a pointerJiri Slaby
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-08Char: cyclades, get rid of phys addressesJiri Slaby
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-08Char: cyclades, simplify variables initializationJiri Slaby
- do not init static variables to 0 - simplify cy_init_card -- use memset(0) and do not zero each element separately, also reorder init, so that same entries are inited at one place 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-08Char: cyclades, mark cyy_init_card as __devinit, not __initJiri Slaby
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-08Char: cyclades, printk cleanupsJiri Slaby
- add printk KERN_ levels to each printk - substitute printk with dev_* when device struct is available 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-08Char: cyclades, irq is intJiri Slaby
don't fetch it to uchar 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-08Char: cyclades, remove useless fileds from cyclades_cardJiri Slaby
pde, ctl_phys and base_phys are useless -- they are never used. 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-08Char: cyclades, unexport struct cyclades_cardJiri Slaby
Do not export internal card data to userspace. cytune doesn't use this 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-08Char: cyclades, switch to pci probingJiri Slaby
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-08Char: cyclades, use IS_CYC_Z macroJiri Slaby
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-08Char: cyclades, allow DEBUG_SHIRQJiri Slaby
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-08Char: cyclades, clear interrupts before releasingJiri Slaby
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-08Char: cyclades, tty_register_device separately for each deviceJiri Slaby
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-08Char: cyclades, cy_init error handlingJiri Slaby
- 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-08Char: cyclades, remove some global varsJiri Slaby
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-08Char: cyclades, init card struct immediatelyJiri Slaby
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-08Char: cyclades, move card entries init into functionJiri Slaby
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-08Char: cyclades, create cy_pci_probeJiri Slaby
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-08Char: cyclades, init Ze immediatelyJiri Slaby
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-08Char: cyclades, use pci_iomap/unmapJiri Slaby
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-08Char: cyclades, create cy_init_ZeJiri Slaby
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-08Char: cyclades, remove useless castsJiri Slaby
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-08Char: cyclades, remove volatilesJiri Slaby
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-08Char: cyclades, timer cleanupJiri Slaby
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-08Char: cyclades, cy_readX/writeX cleanupJiri Slaby
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-08Char: cyclades, remove PAUSEJiri Slaby
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-08drivers/char: use __set_current_state()Milind Arun Choudhary
use __set_current_state(TASK_*) instead of current->state = TASK_*, Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.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>