summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2011-12-08staging: bcm: led_control.c: breaking of long linesJohannes Tenschert
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: bcm: led_control.c: fix parens/bracesJohannes Tenschert
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: bcm: led_control.c: fix commentsJohannes Tenschert
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: bcm: led_control.c: fix indentationJohannes Tenschert
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: bcm: led_control.c: fix whitespacesJohannes Tenschert
Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: bcm: Alter return value for copy_to/from_user() to "return -EFAULT" ↵Kevin McKinney
when an error occurs. In this clean up patch, I altered functions: copy_to/ from_user() to return -EFAULT when an error occurs. I also replaced break statements when an error occurs from copy_to/from_user() with direct returns of -EFAULT. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: bcm: Alter code to move error handling closer to the calls; and ↵Kevin McKinney
remove white space, IOCTL_BCM_NVM_WRITE. This is a clean up patch for IOCTL_BCM_NVM_WRITE that replaces the assignment of the Status variable with direct returns of the error code, replaces the break statements with direct returns, and removes a white space. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: bcm: Fix double free of 'pReadData' in IOCTL_BCM_NVM_WRITE.Kevin McKinney
This patch fixes a memory error in ioctl, IOCTL_BCM_NVM_WRITE. While copying data to user space, if an error occurs, pReadData is freed. Then, at the end of the ioctl, pReadData was being freed again. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging/line6: refactor device information and add POD HD 500Markus Grabner
This patch refactors the device information code and adds preliminary support for the POD HD 500 device. Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging/line6: Remove obsolete codeMarkus Grabner
This patch removes experimental code which is no longer used. Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: line6/midi.c: Fixed call of obsolete function strict_strtoulAndor Daam
The obsolete function strict_strtoul should be replaced by the kstrto* functions. In this context kstrtou16 should be use, as midi_mask_receive is only used as unsigned short. All corresponding datatypes were adapted accordingly. Signed-off-by: Andor Daam <andor.daam@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: line6/midi.c: Fixed call of obsolete function strict_strtoulAndor Daam
The function strict_strtoul is obsolete and should be replaced by the new kstrto* functions. The variable midi_mask_transmit is only used as unsigned short and the datatypes of all affected variables were adjusted accordingly. Signed-off-by: Andor Daam <andor.daam@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: comedi: unlock on error in usbduxsigma_attach()Dan Carpenter
We should release the udev->sem lock before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Staging: comedi: unlock on error in usbdux_ao_inttrig()Dan Carpenter
If we had an invalid trignum (anything other than zero is invalid) then we returned without unlocking. I've modified this function to just have one return point. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: enable forcecrt2type as a module parameterAaro Koskinen
Enable forcecrt2type as a module parameter. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: enable forcecrt2type on XG21Aaro Koskinen
Make "forcecrt2type" to apply also for XG21. The patch enables user to switch LVDS LCD ON/OFF without the need to update the video BIOS. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete "userom" optionAaro Koskinen
Delete a redundant option. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: vb_table: delete XGI21_LCDCapListAaro Koskinen
Delete XGI21_LCDCapList. This data is display specific and does not belong to the driver. It should be provided by the video BIOS. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: move XGI21_LVDSCapStruct into xgifb_video_infoAaro Koskinen
Move the LVDS data into a device-specific data, and eliminate the global variable usage. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: disable LVDS on XG27Aaro Koskinen
XG27 has the second display output already hardcoded to disabled. Just in case, ensure that it has the LVDS code paths disabled. This will simplify the future cleanups. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete XGIfb_GetXG21LVDSData()Aaro Koskinen
Delete XGIfb_GetXG21LVDSData() and code which duplicates xgifb_read_vbios(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): rename to xgifb_read_vbios()Aaro Koskinen
Rename the function to xgifb_read_vbios(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): copy only a single LVDS entryAaro Koskinen
Only a single LVDS table entry is needed by the driver. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): check the BIOS sizeAaro Koskinen
Check the BIOS size to avoid out of bounds array access. Disable LVDS in case errors are detected. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: use u8 for video BIOS dataAaro Koskinen
Use u8 for video BIOS data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete pjVirtualRomBaseAaro Koskinen
Delete a redundant struct member. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete ROMAddrAaro Koskinen
Delete a redundant struct member. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: move video BIOS handling completely to ReadVBIOSTablData()Aaro Koskinen
We need the video BIOS only on XG21 and only during the init, so let's do everything at the same place. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: XGINew_GetXG21Sense(): eliminate video BIOS accessAaro Koskinen
Remove video BIOS access from the routine, use the flag instead which is initialized according to the BIOS data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): use a pointer to access the arrayAaro Koskinen
Use a pointer variable to make some lines shorter and more readable. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): rename pVideoMemoryAaro Koskinen
Rename pVideoMemory to vbios, and also remove volatile at the same go. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZEAaro Koskinen
Use ARRAY_SIZE. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): rearrange code to avoid nestingAaro Koskinen
Rearrange code to avoid deep nesting. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): avoid duplicating codeAaro Koskinen
If the count (j) is 0xff, just do the loop once. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Merge branch 'work-next' into staging-nextGreg Kroah-Hartman
2011-12-08staging:iio: Fix scan mask updateLars-Peter Clausen
When updating the scan mask we have to check the actual scan mask for if the channel is already enabled, not the matching scan mask from the available scan masks. The bit will already be set there and as a result the actual scan mask will not get updated and the channel stays disabled. Also fix the return value of iio_scan_el_store which would return 1 instead of the number of bytes written if the channel was already active in the scan mask. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08Merge branch 'work-next' into staging-nextGreg Kroah-Hartman
2011-12-08staging:iio: Fix sw_ring memory corruptionLars-Peter Clausen
The sw_ring does not properly handle the case where the write pointer already has wrapped around, the read pointer has not and the remaining buffer space at the end is enough to fill the read buffer: +-----------------------------------+ | | |##data##| | +-----------------------------------+ write_p read_p In this case the current code will copy all available data to the buffer and as a result will write beyond the bounds of the buffer and cause a memory corruption. To address this issue this patch adds code to calculate the available buffer space and makes sure that the number of bytes to copy does not exceed this number. This allows the code which copies the data around to be simplified as it only has to consider two cases: Read wraps around and read does not wrap around. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio: Fix typoLars-Peter Clausen
Fix a small typo in the iio_modifer enum. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:buffer.h update struct buffer docs.Jonathan Cameron
These docs have lagged recent developments. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:buffer struct iio_buffer doesn't need an indio_dev pointer.Jonathan Cameron
In all existing cases, the calls are coming from a location where the indio_dev is already available. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:buffer scrap to_iio_buffer as it no longer has meaning.Jonathan Cameron
Now buffers do not have a specific dev structure, this is garbage. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:buffer stop allowing for read_last callback.Jonathan Cameron
No longer needed now we don't allow sysfs acccess to buffer data. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:ring_sw don't provide read last function.Jonathan Cameron
No longer needed as we don't have drivers providing sysfs access to buffered data. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:adc:max1363 stop reading from buffer for sysfs accessJonathan Cameron
No known use case and makes in kernel interface work more complex. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:adc:ad799x stop reading from buffer for sysfs accessesJonathan Cameron
No known use case and makes in kernel interface work more complex. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:adc:ad7887 stop reading from buffer for sysfs access.Jonathan Cameron
No known use case and complicates in kernel interface work. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:adc:ad7993 stop reading from buffer for sysfs raw read.Jonathan Cameron
No known usecase and makes in kernel interface work more complex. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:adc:ad7606 remove buffer access to data from sysfs read.Jonathan Cameron
No known use case and complicates in kernel interface work. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging:iio:adc:ad7606 remove buffer access for sysfs interfaces.Jonathan Cameron
No known use case and complicates in kernel interface work. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>