aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2008-10-13tty: move tioclinux from a special caseAlan Cox
Right now we have ifdefs and hooks in the core ioctl handler for TIOCLINUX and then test if its a console. This is brain dead. Instead call the tioclinux helper from the relevant driver ioctl methods. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13serial: allow 8250 to be used on sparcDavid Miller
This requires three changes: 1) Remove !SPARC restriction in Kconfig. 2) Move Sparc specific serial drivers before 8250, so that serial console devices don't change names on us, even if 8250 finds devices. 3) Since the Sparc specific serial drivers try to use the same major/minor device namespace as 8250, some coordination is necessary. Use the sunserial_*() layer routines to allocate minor number space within TTY_MAJOR when CONFIG_SPARC. This has no effect on other platforms. Thanks to Josip Rodin for bringing up this issue and testing plus debugging various revisions of this patch. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-138250: remove a few inlines of dubious valueWill Newton
Remove some inlines from various functions that are called once, are too big to inline, or are called only from slow path code. This saves around 300 bytes of code for me. Signed-off-by: Will Newton <will.newton@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13serial_8250: pci_enable_device fail is not fully handledAlan Cox
<rmk> talking about leaks - I noticed that the 'check return of pci_enable_dev()' in the 8250 pci resume function finally made it in despite my objections against it (causing stuff in higher levels to leak). Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13ftdi: A few errors are err() that should be debug which causes much spewageAlan Cox
Fixes #10783 Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13usb: fix pl2303 initializationJason Wessel
This patch removes the private check for the termios_initialized for the pl2303 usb driver. It forced the baud to 9600 on the first call to pl2303_set_termios() Based on the tty changes in the 2.6.27 kernel, the termios passed to the *_set_termios functions is always populated the first time. This means there is no need to privately initialize the settings the first time, and doing so will not allow the use of the kernel parameter "console=ttyUSB0,115200" as an example. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13serial-make-uart_ports-ioport-unsigned-long-fixAndrew Morton
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13nozomi: Fix close on errorAlan Cox
Nozomi assumes the close method isn't called if open errors. The tty layer is different to other drives in this respect however. Pointed out by Denis J Barrow. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13audit: Handle embedded NUL in TTY input auditingMiloslav Trmac
Data read from a TTY can contain an embedded NUL byte (e.g. after pressing Ctrl-2, or sent to a PTY). After the previous patch, the data would be logged only up to the first NUL. This patch modifies the AUDIT_TTY record to always use the hexadecimal format, which does not terminate at the first NUL byte. The vast majority of recorded TTY input data will contain either ' ' or '\n', so the hexadecimal format would have been used anyway. Signed-off-by: Miloslav Trmac <mitr@redhat.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13ip2: avoid add_timer with pending timerAkinobu Mita
add_timer() is not supposed to be called when the timer is pending. ip2 driver attempts to avoid that condition by setting and resetting a flag (TimerOn) in timer function. But there is some gap between add_timer() and setting TimerOn. This patch fix this problem by using mod_timer() and remove TimerOn which has been unnecessary by this change. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13ip2: init/deinit cleanupJiri Slaby
Cleanup of module_init/exit: - mostly whitespace - remove empty functions - replace c++ comments - remove useless prints (module loaded, unloaded) - mark the calls as __exit and __init - use break; and return; to save some indent levels after it - note resource leakage It's still mess, but now it's readable. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13ip2: fix sparse warningsJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13ip2: cleanup globalsJiri Slaby
- do not init .bss zeroed data to zero again (by memset or explicit assignment) - use char [] instead of char * for string constants Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Char: merge ip2main and ip2baseJiri Slaby
It's pretty useless to have one setup() function separated along with module_init() which only calls a function from ip2main anyway. Get rid of ip2base. Remove also checks of always-true now. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Char: sx, fix io unmappingJiri Slaby
board->base is increased for CF cards after mapping. Use board->base2 for unmapping the region, since it holds the original/correct address. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Char: cyclades. remove bogus iomapJiri Slaby
readl/writel are not expected to accept iomap return value. Replace bogus mapping by standard ioremap. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Fix oti6858 debug levelScott Ashcroft
For some reason the oti6858 driver undefines and redefines the dbg macro. This makes it spew debugging messages at KERN_INFO instead of KERN_DEBUG. This patch removes the undef and define making the driver log like every other USB serial driver. Signed-off-by: Scott Ashcroft <scott.ashcroft@talk21.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: Fix bug - request UART2/3 peripheral mapped ↵Sonic Zhang
interrupts in PIO mode Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: Fix bug - ircp fails on sir over Blackfin UARTGraf Yang
We now use the sir_dev/irtty_sir/uart/bfin_serial drivers framework to monitor the TX status. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: Fix bug - Don't call tx_stop in tx_transfer.Sonic Zhang
Disable irq and return immediately. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: Remove useless stopSonic Zhang
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: move common variables out of serial headers and into ↵Mike Frysinger
the serial driver move common variables out of serial headers and into the serial driver and rename "nr_ports" to "nr_active_ports" so as to easily differentiate between BFIN_UART_NR_PORTS (the # of available) and nr_ports (the # of enabled) Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: trim trailing whitespace -- no functional changesMike Frysinger
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: Fix bug - should suspend/resume/remove all uart ports.Sonic Zhang
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Blackfin Serial Driver: use __initdata for data, not __initMike Frysinger
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13epca: call tty_port_initAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13coldfire: scheduled SERIAL_COLDFIRE removalAdrian Bunk
This patch contains the scheduled removal of the obsolete SERIAL_COLDFIRE driver. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13drivers/char/hvc_console.c: adjust call to put_tty_driverJulia Lawall
The call to put_tty_driver is out of place and is applied to the wrong argument. The function enclosing the patched code calls alloc_tty_driver and stores the result in drv. Subsequently, there are two occurrences of error handling code, one making a goto to put_tty and one making a goto to stop_thread. At the point of the first one the assignment hvc_driver = drv has not yet been executed, and from inspecting the rest of the file it seems that hvc_driver would be NULL. Thus the current call to put_tty_driver is useless, and one applied to drv is needed. The goto stop_thread is in the error handling code for a call to tty_register_driver, but the error cases in tty_register_driver do not free its argument, so it should be done here. Thus, I have moved the put_tty label after the stop_thread label, so that put_tty_driver is called in both cases. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E,f; position p1,p2,p3; identifier l; statement S; @@ x = alloc_tty_driver@p1(...) ... if (x == NULL) S ... when != E = x when != put_tty_driver(x) goto@p2 l; ... when != E = x when != f(...,x,...) when any ( return \(0\|x\); | return@p3 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; p3 << r.p3; @@ print "%s: call on line %s not freed or saved before return on line %s via line %s" % (p1[0].file,p1[0].line,p3[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13drivers/serial/crisv10.c: add missing put_tty_driverJulia Lawall
alloc_tty_driver is called at the beginning of the function containing the lines of code shown in the patch. Thus, put_tty_driver is needed before returning in the error handling code. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @nr exists@ local idexpression x; expression E,f; position p1,p2,p3; identifier l; statement S; @@ x = alloc_tty_driver@p1(...) ... if (x == NULL) S ... when != E = x when != put_tty_driver(x) when != goto l; ( return \(0\|x\); | return@p3 ...; ) @script:python@ p1 << nr.p1; p3 << nr.p3; @@ print "%s: call on line %s not freed or saved before return on line %s" % (p1[0].file,p1[0].line,p3[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: include/asm-x86/statfs.h
2008-10-13Fix autoloading of MacBook Pro backlight driver.David Woodhouse
Use new MODULE_DEVICE_TABLE(dmi, ...) facility. There's no need for every driver to screw it up for themselves, when the alias can be generated automatically. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-13V4L/DVB (9186): Added support for Prof 7300 DVB-S/S2 cardsOleg Roitburd
Added support for Prof 7300 DVB-S/S2 card. The card based on cx24116 demodulator. Signed-off-by: Oleg Roitburd <oroitburd@gmail.com> Signed-off-by: Steven Toth <stoth@linuxtv.org> [mchehab@redhat.com: fixed CARDLIST.cx88 entry] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9184): cx24116: Change the default SNR units back to percentage by ↵Steven Toth
default. cx24116: Change the default SNR units back to percentage by default. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9183): S2API: Return error of the caller provides 0 commands.Steven Toth
S2API: Return error of the caller provides 0 commands. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9182): S2API: Added support for DTV_HIERARCHYSteven Toth
A user tuning DVB-T via the S2API reports that this was not implemented, and his tuning was failing. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and ↵Steven Toth
DTV_TRANSMISSION_MODE Tuning DVB-T via the S2API was failing, missing some essential items. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9180): S2API: Added support for DTV_CODE_RATE_HP/LPSteven Toth
Reports from users that using the new API for tuning DTV was failing, and the cache was missing some essential items. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.Steven Toth
I've retained the older percentage code after discussing this with Darron Broad, but made the ESNO option default. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9177): S2API: Change _8PSK / _16APSK to PSK_8 and APSK_16Steven Toth
... and cleanup any drivers using them. I've also removed NBC_QPSK and modified the cx24116 driver to check the delivery_type also, removing some excess namespace baggage. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9176): Add support for DvbWorld USB cards with STV0288 demodulator.Igor M. Liplianin
Add support for DvbWorld USB cards with STV0288 demodulator. Those cards use Earda EDS-1547 tuner. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9175): Remove NULL pointer in stb6000 driver.Igor M. Liplianin
Remove NULL pointer in stb6000 driver, as it raises error for DvbWorld USB card. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9174): Allow custom inittab for ST STV0288 demodulator.Igor M. Liplianin
Allow custom inittab for ST STV0288 demodulator, as it is needed for DvbWorld USB card. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9173): S2API: Remove the hardcoded command limit during validationSteven Toth
This means that when developers add new commands then they'll be see the DTV_MAX_COMMAND define and will be more likely to modify it, without having to modify the command validation code. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9172): S2API: Bugfix related to DVB-S / DVB-S2 tuning for the ↵Darron Broad
legacy API. Fixes switching from S2API to legacy where legacy params given to S2API aware demods are cached ones and not those implied in the legacy API. It was found (on an S2API aware demod at least) that after using an S2API aware application and then switching to a legacy application that prior S2API params were in effect were legacy has only implied values. This fixes this. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API.Darron Broad
Quick fix to stop an OOPS if illegal commands are dumped in S2API. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9170): cx24116: Sanity checking to data input via S2API to the ↵Darron Broad
cx24116 demod. Add some sanity checking to data input via S2API to the cx24116 demod. This patch is valid for both s2-mfe and s2. It was found when testing KAFFEINE with S2API support that invalid modulation modes amongst other parameters were being delivered to the demod. In order to debug this sanity checking has been added. An example session would involve kaffeine setting QAM_AUTO when querying DVB-T, then later when trying to tune to DVB-S this cached value would be presented in error. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9169): uvcvideo: Support two new Bison Electronics webcams.Laurent Pinchart
This adds required quirks for the Compaq Presario B1200 and Acer Travelmate 7720 integrated webcams. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13Merge branches 'oprofile-v2' and 'timers/hpet' into x86/core-v4Ingo Molnar
2008-10-13V4L/DVB (9168): Add support for MSI TV@nywhere Plus remoteBrian Rogers
The IR controller has a couple quirks. It won't respond until some other device on the bus is probed. To work around that, probe 0x50 first. Then, since it won't respond to a zero-byte read, probe with a one-byte read. Signed-off-by: Brian Rogers <brian_rogers@comcast.net> [mchehab.redhat.com: Fix merge conflicts and remove an unused var] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB: v4l2-dev: remove duplicated #includeHuang Weiyi
Removed duplicated include "media/cx2341x.h" in drivers/media/video/cx23885/cx23885-417.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>