summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2012-09-11staging: comedi: icp_multi: remove rangelist_ai from boardinfoH Hartley Sweeten
There is only one board type supported by this driver and the analog input ranges are constant. Remove the boardinfo for 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 ranglist_ao from boardinfoH Hartley Sweeten
This variable is not used by 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 ai_maxdata from boardinfoH Hartley Sweeten
The analog inputs of this board always have 12-bit resolution. Remove the boardinfo and just open-code the value. 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 ao_maxdata from boardinfoH Hartley Sweeten
The analog outputs of this board always have 12-bit resolution. Remove the boardinfo and just open-code the value. 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 n_aichand from boardinfoH Hartley Sweeten
The analog inputs for this board always support differential inputs and the number of channels is half the normal analog input number. Remove the n_aichand field from the boardinfo and fix the code accordingly. 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 n_aichan from boardinfoH Hartley Sweeten
There is only one board type supported by this driver and the number of analog input channels is constant. Remove the boardinfo for it and just open-code the value. 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 n_aochan from boardinfoH Hartley Sweeten
There is only one board type supported by this driver and the number of analog output channels is constant. Remove the boardinfo for it and just open-code the value. 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 n_dichan from boardinfoH Hartley Sweeten
There is only one board type supported by this driver and the number of digital input channels is constant. Remove the boardinfo for it and just open-code the value. 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 n_dochan from boardinfoH Hartley Sweeten
There is only one board type supported by this driver and the number of digital output channels is constant. Remove the boardinfo for it and just open-code the value. 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 n_ctrs from boardinfoH Hartley Sweeten
There is only one board type supported by this driver and the number of counter channels is constant. Remove the boardinfo for it and just open-code the value. 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 ICP_MULTI_EXTDEBUGH Hartley Sweeten
This define enables a bunch of function trace messages. These should be removed 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-11staging: comedi: icp_multi: convert to a pci_driverH Hartley Sweeten
This driver is for a PCI device not a legacy device. Convert it from a module_comedi_driver to a module_comedi_pci_driver. This will allow using the comedi_pci_auto_config mechanism to attach to the device. 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: ipack/bridges/tpci200: Store the irq holder in slot_irq.Jens Taprogge
This way we do no longer need to keep a dangling pointer to struct ipack_device in tpci200_slot after the device has been removed. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: ipack: delete .remove_device() callbackSamuel Iglesias Gonsálvez
As the IP module driver takes care of freeing its resources. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: ipack/bridges/tpci200: remove tpci200_slot_unregisterSamuel Iglesias Gonsálvez
It is not needed as the IP module should free its IRQ using tpci200_free_irq callback. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: ipack/bridges/tpci200: delete ipack_device_unregister calls when ↵Samuel Iglesias Gonsálvez
exiting As the ipack_bus_unregister() takes care of unregistering the devices plugged in the carrier, it is not needed to do it in the carrier driver. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11Staging: ipack: unregister devices when uninstall the carrier device.Samuel Iglesias Gonsálvez
Find the IP modules that are plugged to the carrier and unregister them. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>