summaryrefslogtreecommitdiffstats
path: root/drivers/char/cyclades.c
Commit message (Collapse)AuthorAgeFilesLines
* Char: cyclades, fix potential NULL dereferenceJiri Slaby2007-10-231-1/+1
| | | | | | | | | | | | | | | | 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>
* Documentation: Remove references to dead "cyclades=" boot optionRobert P. J. Day2007-10-201-2/+0
| | | | | Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* Convert files to UTF-8 and some cleanupsJan Engelhardt2007-10-191-1/+1
| | | | | | | | | | | | | | | | | | * 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>
* Cyclades: Avoid label defined but not used warningJesper Juhl2007-10-181-4/+4
| | | | | | | | | | | 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>
* Char: cyclades, fix some -W warningsJiri Slaby2007-10-181-49/+39
| | | | | | | | 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>
* Char: cyclades, move spin_lock to one placeJiri Slaby2007-10-181-7/+2
| | | | | | | | | 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>
* Char: cyclades, make the isr code readableJiri Slaby2007-10-181-325/+292
| | | | | | | | | 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>
* Char: cyclades, remove bottom half processingJiri Slaby2007-10-181-91/+20
| | | | | | | | | | | | 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>
* drivers/*: mark variables with uninitialized_var()Jeff Garzik2007-07-171-2/+2
| | | | | | | | 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>
* Char: cyclades, fix sparse warningJiri Slaby2007-07-171-10/+8
| | | | | | | | 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>
* Char: cyclades, add firmware loadingJiri Slaby2007-07-171-23/+328
| | | | | | | | 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>
* serial: remove termios checks from various old char serial driversAlan Cox2007-07-161-4/+0
| | | | | | | 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>
* Char: cyclades, fix deadlockJiri Slaby2007-05-231-0/+1
| | | | | | | | | 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>
* Char: cyclades, copyright and version changesJiri Slaby2007-05-081-4/+4
| | | | | | | | | - 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>
* Char: cyclades, probe cleanupJiri Slaby2007-05-081-270/+198
| | | | | | | | | | - 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>
* Char: cyclades, dynamic portsJiri Slaby2007-05-081-73/+69
| | | | | | | | 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>
* Char: cyclades, fix tty device unregisterJiri Slaby2007-05-081-2/+2
| | | | | | | | 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>
* Char: cyclades, conditions cleanupJiri Slaby2007-05-081-39/+21
| | | | | | | | | | | - 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>
* Char: cyclades, remove locking macrosJiri Slaby2007-05-081-127/+118
| | | | | | | | 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>
* Char: cyclades, remove unused timestampsJiri Slaby2007-05-081-12/+0
| | | | | | 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: cyclades, timers cleanupJiri Slaby2007-05-081-12/+5
| | | | | | 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: cyclades, fix blockmoveJiri Slaby2007-05-081-18/+16
| | | | | | | | | 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>
* Char: cyclades, remove sleep_onJiri Slaby2007-05-081-29/+16
| | | | | | | | 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>
* Char: cyclades, make info->card a pointerJiri Slaby2007-05-081-161/+162
| | | | | | 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: cyclades, get rid of phys addressesJiri Slaby2007-05-081-8/+3
| | | | | | 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: cyclades, simplify variables initializationJiri Slaby2007-05-081-112/+44
| | | | | | | | | | | - 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>
* Char: cyclades, mark cyy_init_card as __devinit, not __initJiri Slaby2007-05-081-2/+2
| | | | | | 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: cyclades, printk cleanupsJiri Slaby2007-05-081-310/+220
| | | | | | | | | - 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>
* Char: cyclades, irq is intJiri Slaby2007-05-081-18/+12
| | | | | | | | 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>
* Char: cyclades, remove useless fileds from cyclades_cardJiri Slaby2007-05-081-9/+0
| | | | | | | | 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>
* Char: cyclades, unexport struct cyclades_cardJiri Slaby2007-05-081-8/+0
| | | | | | | | | 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>
* Char: cyclades, switch to pci probingJiri Slaby2007-05-081-48/+17
| | | | | | 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: cyclades, use IS_CYC_Z macroJiri Slaby2007-05-081-11/+6
| | | | | | 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: cyclades, allow DEBUG_SHIRQJiri Slaby2007-05-081-0/+4
| | | | | | | | | 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>
* Char: cyclades, clear interrupts before releasingJiri Slaby2007-05-081-0/+13
| | | | | | | | | 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>
* Char: cyclades, tty_register_device separately for each deviceJiri Slaby2007-05-081-1/+19
| | | | | | | | | 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>
* Char: cyclades, cy_init error handlingJiri Slaby2007-05-081-4/+19
| | | | | | | | | - 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>
* Char: cyclades, remove some global varsJiri Slaby2007-05-081-9/+4
| | | | | | 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: cyclades, init card struct immediatelyJiri Slaby2007-05-081-22/+15
| | | | | | 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: cyclades, move card entries init into functionJiri Slaby2007-05-081-155/+156
| | | | | | 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: cyclades, create cy_pci_probeJiri Slaby2007-05-081-305/+318
| | | | | | | | 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>
* Char: cyclades, init Ze immediatelyJiri Slaby2007-05-081-51/+8
| | | | | | | | 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>
* Char: cyclades, use pci_iomap/unmapJiri Slaby2007-05-081-10/+32
| | | | | | | | | 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>
* Char: cyclades, create cy_init_ZeJiri Slaby2007-05-081-73/+90
| | | | | | | | | 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>
* Char: cyclades, remove useless castsJiri Slaby2007-05-081-19/+19
| | | | | | | | 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>
* Char: cyclades, remove volatilesJiri Slaby2007-05-081-27/+25
| | | | | | | | 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>
* Char: cyclades, timer cleanupJiri Slaby2007-05-081-12/+6
| | | | | | | | 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>
* Char: cyclades, cy_readX/writeX cleanupJiri Slaby2007-05-081-165/+150
| | | | | | | | | | | 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>
* Char: cyclades, remove PAUSEJiri Slaby2007-05-081-9/+0
| | | | | | | | | | 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>
* drivers/char: use __set_current_state()Milind Arun Choudhary2007-05-081-2/+2
| | | | | | | | | 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>
OpenPOWER on IntegriCloud