summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-09-12Staging: ipack: Let interrupts return irqreturn_t.Jens Taprogge
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: move tpci200_free_irq() and ↵Jens Taprogge
tpci200_request_irq() Now, all the interrupt related functions are next to each other. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: More cleanups.Jens Taprogge
Rename __tpci_request_irq() to tpci_enable_irq() and __tpci_free_irq() to tpci_disable_irq(). Change their second argument, move them above tpci200_interrupt(), and use tpci_disable_irq() in the latter Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: Cleanup in tpci200_slot_irq() and ↵Jens Taprogge
tpci200_interrupt() Minor cleanup. No functional changes. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: Clean up interrupt handling.Jens Taprogge
Previously the return value from tpci200_interrupt was not quite correct if a slot had caused an interrupt but no handler was instellalled: IRQ_NONE was returned. However in this case we react to the interrupt by disabling the IPack device interrupt. Basically there are two cases the code now distinguishes: - The tpci200 has raised an interrupt. We handle it and return IRQ_HANDLED. - Our device did not raise an interrupt. We return IRQ_NONE. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: Protect device registers with spinlock.Jens Taprogge
Some of the device registers are accessed from both interrupt and non-interrupt context. To ensure proper read-modify-write modification of these registers we can not use the "global" tpci200 mutex. Instead a spin-lock is used. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: RCU protect slot_irq pointers.Jens Taprogge
In tpci200_request_irq as well as tpci200_free_irq we set and unset the pointer to struct slot_irq. This pointer is accessed in tpci200_interrupt. To ensure that the pointer is not freed after it has been fetched in tpci200_interrupt() it is now protected through RCU. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/devices/ipoctal: remove superfluous function.Jens Taprogge
ipoctal_write_tty and ipoctal_write are merged. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/devices/ipoctal: Split interrupt service routine.Jens Taprogge
Split the IRQ service routing in TX part and RX part. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/devices/ipoctal: Store isr masks in ipoctal_channelJens Taprogge
This way interrupt handling becomes independent of the channel number. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/devices/ipoctal: put ipoctal_channel into tty->driver_data.Jens Taprogge
Each tty's driver_data is now pointing to the channel it is talking to. struct ipoctal_channel contains all the information the callbacks require to do their work. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/devices/ipoctal: Directly use ioread/iowrite function.Jens Taprogge
Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/devices/ipoctal: split ipoctal_channel from ipoctal.Jens Taprogge
By moving everything channel related into a separate struct we will be able to clean up a lot of code. In the end tty->driver_data will no longer need to point to ipoctal but instead can point to the respective channel. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: Clean up interrupt handler.Jens Taprogge
This also removes a possible bug in the unhandles_ints part when slots[i] is not set. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: Remove side effects of ↵Jens Taprogge
tpci200_{request,free}_irq. Use the __tpci200_{set,clear}_mask routines to access control register. Do not overwrite flags unrelated to interrupt handling. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: ipack/bridges/tpci200: add helpers for writing control regs.Jens Taprogge
Convert tpci200_set_clockrate and tpci200_interrupt. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging/gdm72xx: gdm_usb coding style clean upMacpaul Lin
gdm_usb.* coding style clean up. Signed-off-by: Macpaul Lin <macpaul@gmail.com> Cc: Paul Stewart <pstew@chromium.org> Cc: Ben Chan <benchan@chromium.org> Cc: Sage Ahn <syahn@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: xgifb: prevent video RAM size exceeding PCI window sizeAaro Koskinen
Add a sanity check for the video RAM size. It should fit into the PCI window. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: xgifb: validate the mode against video memory sizeAaro Koskinen
It's possible to select video mode that exceeds the available video memory. This is potentially dangerous, fix by adding a check. The patch fixes system hangs seen occasionally when playing random videos with mplayer. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: silicom: remove S_IWOTH from proc declarationDan Carpenter
We don't need these to be world writable or group writable. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfreePeter Senna Tschudin
Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12drivers/staging/rtl8192u/r8192U_core.c: Remove useless kfreePeter Senna Tschudin
Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12Staging: bcm: Create and initialize new device id in InterfaceInitKevin McKinney
This patch create and initalizes a new device id of 0x172 as reported by Rinat Camalov <richman1000000d@gmail.com>. In addition, a comment is added to the potential invalid existing device id. Reported-by: Rinat Camalov <richman1000000d@gmail.com> Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adq12b: remove devpriv macroH Hartley Sweeten
This macro relies on a local variable having a specific name. Also, remove the kfree in the detach. The comedi core handles the kfree of dev->private. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adl_pci9118: use cfc_check_trigger_srcH Hartley Sweeten
The the cfc_check_trigger_src helper for the "step 1" tests in pci9118_ai_cmdtest(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adl_pci9118: remove forward declarationsH Hartley Sweeten
Move some of the functions to remove the need for the forward declarations. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adl_pci9118: remove commented out printk debugH Hartley Sweeten
These debug messages should be removed from the final driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adl_pci9118: remove the function separation commentsH Hartley Sweeten
These are just unnecessary whitespace. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adl_pci9118: remove PCI9118_EXTDEBUG and DPRINTKH Hartley Sweeten
These macros enable a bunch of function trace messages. These should not be in the final driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adl_pci9118: remove devpriv and this_board macrosH Hartley Sweeten
These macros rely on a local variable having a specific name. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: use cfc_check_trigger_is_uniqueH Hartley Sweeten
Use the helper function cfc_check_trigger_is_unique for the "step 2a" tests of pci171x_ai_cmdtest(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: single source triggers are uniqueH Hartley Sweeten
If a single source trigger passes "step 1" of the do_cmdtest function they are already unique. There is no need to recheck them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: use cfc_check_trigger_srcH Hartley Sweeten
Use the helper function cfc_check_trigger_src for the "step 1" tests of pci171x_ai_cmdtest(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: remove "dummy" boardinfo entryH Hartley Sweeten
The legacy attach used the "dummy" boardinfo entry to allow matching a boardinfo to a pci card based on the "name" passed by the comedi core. This driver now uses the PCI auto config mechanism which always matches to the PCI vendor/device ids. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: remove unnecessary 'valid'H Hartley Sweeten
The 'valid' variable in the private data is only used in the detach of the board to determine if the pci1710_reset() function can be called. That function only requires a valid dev->iobase to work. Use that for the check instead and remove the unneeded variable from the private data. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: use attach_pci callbackH Hartley Sweeten
Convert this PCI driver to use the comedi PCI auto config attach mechanism by adding an 'attach_pci' callback function. Since the driver does not require any external configuration options, and the legacy 'attach' callback is now optional, remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12staging: comedi: adv_pci1710: remove board attach noiseH Hartley Sweeten
Remove the kernel message noise during the attach of the board. Use a simple/clean dev_info at the end of the attach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: silicom: checkpatch cleanup: header tabs n spacesDaniel Cotey
Fix defines to comply with style guidelines Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: silicom: minor cleanup: remove unused defineDaniel Cotey
DEVICE_NODE not used Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: silicom: checkpatch: cleanup macrosDaniel Cotey
Fix msec_delay_bp macro formatting Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: adl_pci9111: remove pci_dev_put()H Hartley Sweeten
This driver no longer walks the pci bus to find the pci_dev. The pci_dev_put() is no longer needed. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove the function description commentsH Hartley Sweeten
These comments are pretty obvious. Remove them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove devpriv macroH Hartley Sweeten
This macro relies on a local variable having a specific name. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: use attach_pci callbackH Hartley Sweeten
Convert this PCI driver to use the comedi PCI auto config attach mechanism by adding an 'attach_pci' callback function. Since the driver does not require any external configuration options, and the legacy 'attach' callback is now optional, remove it. The boardinfo is also not needed now so remove it also. This also allows removing the icp_multi.h header completely. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove board attach noiseH Hartley Sweeten
Remove the kernel message noise during the attach of the board. Use a simple/clean dev_info at the end of the attach. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: the number of subdevices is fixedH Hartley Sweeten
This board always has 5 subdevices. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove have_irq from boardinfoH Hartley Sweeten
The board supported by this driver always supports interrupts. Remove the boardinfo. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove iorange from boardinfoH Hartley Sweeten
This variable is not used in the driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove cardtype from boardinfoH Hartley Sweeten
This variable is not used in the driver. Remove it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11staging: comedi: icp_multi: remove rangecode from boardinfoH Hartley Sweeten
The analog inputs and outputs for this driver use the same table to set the analog range. Remove the boardinfo for it and just reference the table directly. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>