Greg Kroah-Hartman [Fri, 29 Mar 2013 15:37:58 +0000 (08:37 -0700)]
Merge tag 'iio-for-3.10b' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second round of IIO cleanups for the 3.10 cycle
1) A nice little removal of the unwanted private pointer from
struct iio_trigger.
2) Some clean up of the ad799x driver.
3) Couple of cleanups for the exynos_adc driver and some documentation.
4) Move the mxs-lradc initialization a little earlier in the driver to avoid
wiping out the configuration just after setting it.
A nice small set of worthy bits and bobs.
Doug Anderson [Wed, 13 Mar 2013 20:39:00 +0000 (20:39 +0000)]
iio: adc: Document the regulator/clocks for exynos-adc
The exynos ADC won't work without a regulator called "vdd" and a clock
called "adc". Document this fact in the device tree bindings.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alexandre Belloni [Thu, 28 Mar 2013 22:04:00 +0000 (22:04 +0000)]
iio: mxs-lradc: Do hardware initialization earlier
We need to initialize hardware before registering the touchscreen. Else,
we end up setting registers in mxs_lradc_ts_open(), getting called just
after registering the touchscreen with input_register_device() and by
the end of mxs_lradc_probe(), we reset the LRADC block hence losing the
correct configuration.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Sachin Kamat [Tue, 26 Mar 2013 11:52:00 +0000 (11:52 +0000)]
iio: exynos-adc: Fix typo in DT documentation
Fixes some typos in the documentation of exynos-adc.txt.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Sachin Kamat [Tue, 26 Mar 2013 09:42:00 +0000 (09:42 +0000)]
iio: exynos_adc: Remove redundant of_match_ptr macro
exynos_adc is a DT only driver and exynos_adc_match table is always
compiled in. Hence remove the macro.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Preallocate sample buffer
Avoid allocating and freeing the sample buffer for each transfer. Instead
allocate it once when we start sampling. Also pre-compute the number of bytes we
need to transfer in the same way.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Set IIO_CHAN_INFO_SCALE mask
The driver has support for reporting a channels scale, but none of the channels
set the IIO_CHAN_INFO_SCALE mask. Add the IIO_CHAN_INFO_SCALE to all channels to
indicate that the drivers supports reporting the scale.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Add helper macro for channel initialization
The ad779x channels all follow the same pattern. Add a helper macro to
initialize the channel spec, this allows us to drop quite a few lines.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Use i2c_smbus_{read,write}_word_data_swapped
Use i2c_smbus_{read,write}_word_data_swapped instead of open-coding it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Tue, 26 Mar 2013 18:43:00 +0000 (18:43 +0000)]
staging:iio:ad799x: Remove internal reference support
None of the devices supported by this driver have an internal voltage reference,
so remove support for it from the driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Tue, 26 Mar 2013 18:42:00 +0000 (18:42 +0000)]
staging:iio:ad799x: Remove unused ad799x_state fields
Remove fields from the ad799x_state struct which are not used.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Emil Goode [Wed, 27 Mar 2013 16:47:49 +0000 (17:47 +0100)]
staging: comedi: amplc_dio200: fix C99 array initializer warnings
This patch fixes the following sparse warnings about use of
obsolete array initializer:
drivers/staging/comedi/drivers/amplc_dio200_pci.c:256:24: warning:
obsolete array initializer, use C99 syntax
drivers/staging/comedi/drivers/amplc_dio200_pci.c:269:24: warning:
obsolete array initializer, use C99 syntax
drivers/staging/comedi/drivers/amplc_dio200_pci.c:281:25: warning:
obsolete array initializer, use C99 syntax
drivers/staging/comedi/drivers/amplc_dio200_pci.c:298:25: warning:
obsolete array initializer, use C99 syntax
drivers/staging/comedi/drivers/amplc_dio200_pci.c:315:25: warning:
obsolete array initializer, use C99 syntax
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:01:58 +0000 (15:01 -0700)]
staging: comedi: rtd520: remove utcGate from private data
This variable in the private data is not used. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:01:39 +0000 (15:01 -0700)]
staging: comedi: rtd520: remove utcCtrl from private data
This variable in the private data is not necessary. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:01:19 +0000 (15:01 -0700)]
staging: comedi: rtd520: remove intClearMask from private data
This variable in the private data is not necessary. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:00:59 +0000 (15:00 -0700)]
staging: comedi: rtd520: remove intMask from private data
This variable in the private data is not necessary. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:00:40 +0000 (15:00 -0700)]
staging: comedi: rtd520: remove dioStatus from private data
This variable in the private data is not necessary. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:00:22 +0000 (15:00 -0700)]
staging: comedi: rtd520: merge private header into driver
Move the #define's in the private rtd520.h header into the source
file and delete the header.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 21:59:42 +0000 (14:59 -0700)]
staging: comedi: rtd520: cleanup multi-line comments
Cleanup the multi-line comments at the beginning of the file
so they follow the CodingStyle.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 21:59:16 +0000 (14:59 -0700)]
staging: comedi: rtd520: cleanup rtd_dio_insn_config()
Add a local variable to make this function a bit cleaner and
remove the unnecessary comments.
The comedi core expects this function to return the number of
data parameters used. Change the return from '1' to 'insn->n'
to make this more apparent.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 21:58:49 +0000 (14:58 -0700)]
staging: comedi: rtd520: cleanup rtd_dio_insn_bits()
Add some local variables to make this function a bit cleaner and
remove the unnecessary comments.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 21:58:28 +0000 (14:58 -0700)]
staging: comedi: rtd520: use pci_ioremap_bar()
Use pci_ioremap_bar() to ioremap the PCI bars used by this driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 21:58:08 +0000 (14:58 -0700)]
staging: comedi: rtd520: use plx register map from plx9080.h
Use the register map defines for the PLX9080 found in plx9080.h
instead of the custom named defines in rtd520.h.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:45:30 +0000 (15:45 -0700)]
staging: comedi: s626: remove the "interrupt call test"
This commented out code in s626_ai_insn_read() is just left over
development test code. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:45:04 +0000 (15:45 -0700)]
staging: comedi: s626: async commands require an interrupt
Only hook up the analog input command support if the interrupt is
available.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:44:43 +0000 (15:44 -0700)]
staging: comedi: s626: remove the ai (*insn_config) function
This subdevice function is not implemented in the driver. Just
remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:44:27 +0000 (15:44 -0700)]
staging: comedi: s626: cleanup subdevice init
For aesthetic reasons, add some whitespace to the subdevice init.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:43:51 +0000 (15:43 -0700)]
staging: comedi: s626: remove subdevice pointer math
Convert the comedi_subdevice access from pointer match to array
access.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:43:33 +0000 (15:43 -0700)]
staging: comedi: s626: cleanup s626_dio_insn_bits()
Add some local variables to make this function a bit clearer and
remove the unnecessary comments.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:43:15 +0000 (15:43 -0700)]
staging: comedi: s626: cleanup s626_dio_insn_config()
Add some local variables to make this function a bit cleaner.
The comedi core expects this function to return the number of
data parameters used. Change the return from '1' to insn->n to
make this more aparent.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:42:58 +0000 (15:42 -0700)]
staging: comedi: s626: remove the uint16_t casts of the bit values
There are a number of uint16_t casts used in the #define's of the
constant bit field values as well as the calls to DEBIreplace().
These cause a number of sparse warnings of the type:
warning: cast truncates bits from constant value (
ffff1cff becomes 1cff)
Remove all of the casts and change the types of the parameters to
DEBIreplace from uin16_t to unsigned int. This fixes all the warnings.
Mask the addr that is or'ed with DEBI_CMD_RDWORD then written to the
P_DEBICMD register as well as the val written to the P_DEBIAD register
with 0xffff. The addr and val are only 16-bits but the registers are
32-bits.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:42:38 +0000 (15:42 -0700)]
staging: comedi: s626: rename private data 'base_addr' variable
The base_address variable in the private data is the ioremap'ed
PCI bar 0 resource.
For aesthetic reasons, and to shorten some of the lines, rename
this variable to 'mmio'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:42:21 +0000 (15:42 -0700)]
staging: comedi: s626: remove RR7146 macro
This macro relies on a local variable having a specific name its
also just a wrapper around a readl() call. Remove the macro and
just call readl() directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:41:59 +0000 (15:41 -0700)]
staging: comedi: s626: remove WR7146 and SETVECT macros
The WR7146 macro relies on a local variable having a specific name.
This macro is a wrapper around a writel() call. Remove the macro and
just call writel() directly.
The SETVEC macro uses the WR7146 macro so remove it as well and just
do the writel() directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 22:41:41 +0000 (15:41 -0700)]
staging: comedi: s626: remove MC_TEST macro
This macro relies on a local variable having a specific name. Replace
it with a new helper function, s626_mc_test().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:15 +0000 (23:53 +0200)]
staging: xgifb: rename SR15/SR13 arrays to SR18
Since we are programming SR register 18, better name structs/arrays
accordingly to avoid confusion.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:14 +0000 (23:53 +0200)]
staging: xgifb: make SR15/SR13 arrays single dimensional
Since we only access the third row, we can delete the others.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:13 +0000 (23:53 +0200)]
staging: xgifb: XGINew_SetDRAMDefaultRegister340: inline the value of SR1B
SR1B register value is always 3 regardless of video card or RAM type.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:12 +0000 (23:53 +0200)]
staging: xgifb: delete pXGINew_DRAMTypeDefinition
Delete unused struct field.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:11 +0000 (23:53 +0200)]
staging: xgifb: delete XGI330_LCDCapStruct.PWD_2x
Delete unused XGI330_LCDCapStruct fields.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:10 +0000 (23:53 +0200)]
staging: xgifb: delete XGI330_LCDCapStruct.PSC_Sx
Delete unused XGI330_LCDCapStruct fields.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:09 +0000 (23:53 +0200)]
staging: xgifb: delete LCD_SetFlag
Delete redundant XGI330_LCDCapStruct field.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:08 +0000 (23:53 +0200)]
staging: xgifb: delete IF_DEF_TRUMPION and IF_DEF_DSTN
Delete some unused flags.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:07 +0000 (23:53 +0200)]
staging: xgifb: eliminate IF_DEF_LVDS checks from vb_init
Inside vb_init, IF_DEF_LVDS tells only if the vbios was succesfully read
on XG21. Rearrange the code so that we don't need to set or care about
this flag.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 27 Mar 2013 21:53:06 +0000 (23:53 +0200)]
staging: xgifb: delete redundant IF_DEF_LVDS check
IF_DEF_LVDS can be set only on XG21.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joerg Roedel [Wed, 27 Mar 2013 00:43:14 +0000 (01:43 +0100)]
staging: zsmalloc: Fix link error on ARM
Testing the arm chromebook config against the upstream
kernel produces a linker error for the zsmalloc module from
staging. The symbol flush_tlb_kernel_range is not available
there. Fix this by removing the reimplementation of
unmap_kernel_range in the zsmalloc module and using the
function directly. The unmap_kernel_range function is not
usable by modules, so also disallow building the driver as a
module for now.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haksu Jeong [Wed, 27 Mar 2013 11:20:11 +0000 (20:20 +0900)]
staging: rtl8192u: fix coding style
Fix coding style of r8192U_dm.h
Signed-off-by: Haksu Jeong <hsjeong@snu.ac.kr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andres More [Tue, 26 Mar 2013 23:18:30 +0000 (18:18 -0500)]
staging: vt6656: remove consecutive newlines
Several sed -i '/^$/{ N /^\n$/ D }' drivers/staging/vt6656/*.[ch]
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Masanari Iida [Wed, 27 Mar 2013 16:14:56 +0000 (01:14 +0900)]
staging: sep: Fix typo in printk within sep driver
Correct spelling typo in printk.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrew Morton [Tue, 26 Mar 2013 21:58:14 +0000 (14:58 -0700)]
drivers/staging/zcache/zcache-main.c: fix build
flush_dcache_page() takes a page*, not a void*. It breaks ia64.
Remove this and another unused function. Warnings remain:
drivers/staging/zcache/zcache-main.c: In function '__check_disable_cleancache':
drivers/staging/zcache/zcache-main.c:1837: warning: return from incompatible pointer type
drivers/staging/zcache/zcache-main.c: In function '__check_disable_frontswap':
drivers/staging/zcache/zcache-main.c:1838: warning: return from incompatible pointer type
drivers/staging/zcache/zcache-main.c: In function '__check_disable_frontswap_ignore_nonactive':
drivers/staging/zcache/zcache-main.c:1842: warning: return from incompatible pointer type
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 26 Mar 2013 17:27:33 +0000 (10:27 -0700)]
staging: comedi: ni_labpc: fix labpc_calib_insn_write()
The comedi core expects the (*insn_write) operations to write insn->n
values and return the number of values actually wrote.
Make this function work like the core expects.
As Ian Abbott pointed out for the eeprom writes, we really only need
to write the last value to the caldac. The preceding data would be
overwritten anyway.
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>
H Hartley Sweeten [Tue, 26 Mar 2013 17:27:11 +0000 (10:27 -0700)]
staging: comedi: ni_labpc: fix labpc_calib_insn_read()
The comedi core expects the (*insn_read) operations to read insn->n
values and return the number of values actually read.
Make this function work like the core expects.
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>
H Hartley Sweeten [Tue, 26 Mar 2013 17:26:38 +0000 (10:26 -0700)]
staging: comedi: ni_labpc: simplify labpc_range_is_unipolar()
As Ian Abbott pointed out, this helper function can be simplified
by just checking if the 'min' value is >= 0.
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>
H Hartley Sweeten [Tue, 26 Mar 2013 17:25:57 +0000 (10:25 -0700)]
staging: comedi: ni_labpc: fix labpc_eeprom_insn_write()
The comedi core expects the (*insn_write) operations to write insn->n
values and return the number of values actually wrote.
Make this function work like the core expects.
As Ian Abbott pointed out, we really only need to write the last value
to the eeprom. The preceding data would be overwritten anyway.
Also, remove the noise about invalid channels.
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>
Andres More [Tue, 26 Mar 2013 22:12:26 +0000 (17:12 -0500)]
staging: vt6656: remove unused functions
Removed defined symbols not being used elsewhere.
Only compile tested.
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Masanari Iida [Tue, 26 Mar 2013 15:23:28 +0000 (00:23 +0900)]
staging: davinci: Fix typo in staging/media/davinci
Correct spelling typo in staging/media/davinci
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nick Østergaard [Tue, 26 Mar 2013 13:17:10 +0000 (14:17 +0100)]
staging: wlan-ng: prism2usb.c: fix printk(KERN_ERR... to dev_err(dev, ...
Fix checkpatch warning. Change printk(KERN_ERR ... to dev_err(dev ...
Signed-off-by: Nick Østergaard <oe.nick@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Zimmerman [Tue, 26 Mar 2013 00:03:36 +0000 (17:03 -0700)]
staging: dwc2: fix wrong setting of DMA masks
We were setting the DMA masks in dwc2_driver_probe(), but that is
before the driver parameters have been set to their default values.
That meant the DMA masks could be set wrong. Fix it by moving the
DMA mask setting into dwc2_hcd_init(), after the driver parameters
have been set.
Reported-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Zimmerman [Tue, 26 Mar 2013 00:03:35 +0000 (17:03 -0700)]
staging: dwc2: remove unneeded arguments from two functions
Remove the unneeded struct device *dev argument from dwc2_hcd_init()
and dwc2_hcd_remove(), and pass in the value through the hsotg->dev
member instead
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthijs Kooijman [Mon, 25 Mar 2013 19:00:25 +0000 (12:00 -0700)]
staging: dwc2: always release host channel after dequeueing
Previously, when an active urb was dequeued, its host channel would
not always be released. There is some special handling for this in
dwc2_hc_chhltd_intr_dma, but when it was the last urb/qtd in its qh, a
safeguard in dwc2_hc_n_intr would short-circuit and prevent the regular
interrupt handlers from running, without releasing the channel.
This is easily triggered when using a 3G modem using the option driver.
Opening and closing any ttyUSBx device will eat up a host channel that
is forever unusable from that point on.
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
[paulz@synopsys.com: fixed comment style and added a couple of NULL checks]
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 25 Mar 2013 19:50:44 +0000 (19:50 +0000)]
staging: vt6656: Fix stuck in scanning with variable uScanChannel.
When pMgmt->uScanChannel > pDevice->byMaxChannel scanning ends
but no SIOCGIWSCAN(scan done) message is sent. This section of code is
duplicate of that in WLAN_CMD_SCAN_END which sends scan done.
So remove it and jump eCommandState to WLAN_CMD_SCAN_END.
Increment uScanChannel on !ChannelValid.
At WLAN_CMD_SCAN_END reset uScanChannel to 0 when done.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lars-Peter Clausen [Mon, 25 Mar 2013 08:58:00 +0000 (08:58 +0000)]
iio:trigger: Use dev_{set,get}_drvdata for private data management
Use dev_{set,get}_drvdata for managing private data attached to a trigger
instead of using a custom field in the iio_trigger struct.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lars-Peter Clausen [Mon, 25 Mar 2013 08:58:00 +0000 (08:58 +0000)]
iio:trigger: Introduce iio_tigger_{set,get}_drvdata
Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific
data to a trigger. The functions wrap access to the triggers private_data field
and all current users are updated to use iio_tigger_{set,get}_drvdata instead of
directly accessing the private_data field. This is the first step towards
removing the private_data field from the iio_trigger struct.
The following coccinelle script has been used to update the drivers:
<smpl>
@@
struct iio_trigger *trigger;
expression priv;
@@
-trigger->private_data = priv
+iio_trigger_set_drv_data(trigger, priv)
@@
struct iio_trigger *trigger;
@@
-trigger->private_data
+iio_trigger_get_drv_data(trigger)
</smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:57:40 +0000 (15:57 -0700)]
staging: comedi: s626: remove MC_DISABLE macro
This macro relies on a local variable having a specific name. Replace
it with a new helper function, s626_mc_disable().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:57:21 +0000 (15:57 -0700)]
staging: comedi: s626: remove MC_ENABLE macro
This macro relies on a local variable having a specific name. Replace
it with a new helper function, s626_mc_enable().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:57:02 +0000 (15:57 -0700)]
staging: comedi: s626: #ifdef out a block of unused code
Currently the unused s626_ai_rinsn() function is commented out with
/* ... */ on every line of the function. Remove those by using an
This block will be removed once it is determined that it really
is not needed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:56:32 +0000 (15:56 -0700)]
staging: comedi: s626: cleanup comedi_lrange table
Reformat the whitespace in the comedi_lrange table and use the
BIP_RANGE() macro instead of generic RANGE() macro.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:56:13 +0000 (15:56 -0700)]
staging: comedi: s626: factor counter interrupt handling from s626_irq_handler()
Factor the code that handles the counter interrupt out of s626_irq_handler().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:55:51 +0000 (15:55 -0700)]
staging: comedi: s626: factor eos interrupt handling from s626_irq_handler()
Factor the code that handles the end of scan interrupt out of
s626_irq_handler().
Remove the printk noise when cfc_write_to_buffer() fails. The user
can't do anything about it anyway.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:55:29 +0000 (15:55 -0700)]
staging: comedi: s626: use a local var for the s->async in s626_irq_handler()
The comedi_async pointer is used a number of times in this function.
For aesthetic reasons, use a local variable for the pointer.
Also, since was already have a pointer to the "cmd" use that in the
for loop instead of s->async->cmd (or even async->cmd).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:55:07 +0000 (15:55 -0700)]
staging: comedi: s626: cleanup "subdevice" and "cmd" in s626_irq_handler()
The comedi_subdevice in this function is actually the dev->read_subdev
that was initialized during the attach of the board. Use that instead
of accessing the dev->subdevices array directly.
Also, get the comedi_cmd used in s626_irq_handler() when the function
is first entered.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:54:45 +0000 (15:54 -0700)]
staging: comedi: s626: factor dio interrupt handling from s626_irq_handler()
Factor the code that checks and handles the dio interrupts out of
s626_irq_handler().
This allows reducing the number of indents in the code and makes it
easier to follow.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 22:54:20 +0000 (15:54 -0700)]
staging: comedi: s626: simplify dio register access
This driver has three dio subdevices, each with 16 channels. These
subdevices use hardware registers that are spaced 0x10 bytes apart
for each "group" of 16 channels.
Create new macros to get the correct addresses for each register
based on the dio "group". Use the s->private (void *) to hold the
"group" number to use in the subdevice functions.
This allows removing struct dio_private and all its uses. It also
removes the ugly casts used to get the register address.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 16:57:48 +0000 (09:57 -0700)]
staging: comedi: ni_labpc: fix labpc_eeprom_insn_read()
The comedi core expects the (*insn_read) operations to read insn->n
values and return the number of values actually read.
Make this function work like the core expects.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:57:26 +0000 (09:57 -0700)]
staging: comedi: ni_labpc: return bool from labpc_use_continuous_mode()
This is a simple true/false test, return bool instead of int.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:56:48 +0000 (09:56 -0700)]
staging: comedi: ni_labpc: cleanup trigger setting in labpc_ai_cmd()
The (*do_cmdtest) already validated the cmd sources so the default
cases in the switch() statements can never happen.
Preclear to trigger bits and change the switch() statements to simple
if() tests to set the bits.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:56:25 +0000 (09:56 -0700)]
staging: comedi: ni_labpc: remove board attach noise
Remove the kernel noise in labpc_common_attach() as well as a couple
obvious comments.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:55:54 +0000 (09:55 -0700)]
staging: comedi: ni_labpc: dma requires an interrupt
DMA support only works if an interrupt is available.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:55:30 +0000 (09:55 -0700)]
staging: comedi: ni_labpc: allow board to attach without dma
If the dma channel is not available this driver will still work
with interrupts for the analog input subdevice command support.
In addition, only dma channels 1 and 3 are valid for the ISA
devices.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:55:08 +0000 (09:55 -0700)]
staging: comedi: ni_labpc: allow board to attach without interrupt
If the interrupt is not available this driver will still work
with command support disabled for the analog input subdevice.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:54:41 +0000 (09:54 -0700)]
staging: comedi: ni_labpc: return error from labpc_counter_set_mode()
Make sure labpc_counter_set_mode() was successfull and return any
errno back to the caller.
For the if/else conditions that either load the counter of just set
the mode, use a common error patch to check for the error.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:54:16 +0000 (09:54 -0700)]
staging: comedi: ni_labpc: cleanup labpc_counter_load() usage
For aesthetic reasons, move the labpc_counter_load() function so
it's by the labpc_counter_set_mode() function.
Update all the labpc_counter_load() calls so that the I8254_MODE*
enums are used instead of the open coded values.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:53:49 +0000 (09:53 -0700)]
staging: comedi: ni_labpc: introduce labpc_counter_set_mode()
Introduce labpc_counter_set_mode() which is a wrapper around the
i8254_set_mode() helpers to program the 8254 timers. Use the new
function instead of directly writing to the timer mode register
with a "magic" number.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:53:20 +0000 (09:53 -0700)]
staging: comedi: ni_labpc: remove inline from labpc_counter_load()
Let the compiler figure out if this function should be inlined.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:52:15 +0000 (09:52 -0700)]
staging: comedi: ni_labpc: move a couple of the #define's
For aesthetic reasons, move a couple of the #defines in this file
so that the register map defines are first.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:51:45 +0000 (09:51 -0700)]
staging: comedi: ni_labpc: clean up register map
Rename the register map defines to better match the National
Instruments Register-Level Programming Manual for the labpc.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:51:23 +0000 (09:51 -0700)]
staging: comedi: ni_labpc: clean up multi-line comments
Clean up the multi-line comments at the beginning of the file
so that they follow the CodingStyle.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:50:56 +0000 (09:50 -0700)]
staging: comedi: ni_labpc: fix a > 80 char line issue
Fix a checkpatch.pl warning about a line over 80 characters.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:50:31 +0000 (09:50 -0700)]
staging: comedi: ni_labpc: introduce labpc_ai_wait_for_data()
Introduce a helper function to wait for the a/d conversion to
complete.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:50:03 +0000 (09:50 -0700)]
staging: comedi: ni_labpc: introduce labpc_read_adc_fifo()
Introduce a helper function to read the a/d conversion result
from the fifo.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:49:34 +0000 (09:49 -0700)]
staging: comedi: ni_labpc: introduce labpc_setup_cmd6_reg()
Introduce a helper function to set the COMMAND6_REG.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:49:10 +0000 (09:49 -0700)]
staging: comedi: ni_labpc:use labpc_cancel() to remove some common code
The labpc_cancel() function can be used by the labpc_ai_insn_read() and
labpc_ai_cmd() functions to disable the ai subdevice.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:48:44 +0000 (09:48 -0700)]
staging: comedi: ni_labpc: introduce labpc_ai_set_chan_and_gain()
Introduce a helper function to set the channel and gain bits in the
COMMAND1_REG.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:48:19 +0000 (09:48 -0700)]
staging: comedi: ni_labpc: cleanup local var declarations in labpc_ai_insn_read()
Determine the chan, range, and aref when the variables are declared.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:47:51 +0000 (09:47 -0700)]
staging: comedi: ni_labpc: cleanup local var declarations in labpc_ai_cmd()
Determine the scan_mode early and get the proper chanspec so that
the chan, range, and aref can be determined when the variables are
declared.
labpc_ai_chanlist_invalid() checks that all the range and aref values
in the chanlist are the same so, for consistency, use the same chanspec
used to get the chan.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:47:20 +0000 (09:47 -0700)]
staging: comedi: ni_labpc: remove unnecessary test of dev->irq
The ai subdevice (*do_cmd) pointer is only initialized if the
driver has successfully requested the interrupt. The extra test
in labpc_ai_cmd() is not necessary.
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>
H Hartley Sweeten [Fri, 22 Mar 2013 16:46:53 +0000 (09:46 -0700)]
staging: comedi: ni_labpc: move declaration of local var 'irq_flags'
In labpc_ai_cmd(), move the declaration of the local variable
'irq_flags' to remove the need for the extra #ifdef/#endif.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 16:46:28 +0000 (09:46 -0700)]
staging: comedi: ni_labpc: remove DRV_NAME
Remove the DRV_NAME define and just open code the string in the
comedi_driver and pci_driver declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 16:46:05 +0000 (09:46 -0700)]
staging: comedi: ni_labpc: use dev->board_name instead of DRV_NAME
In labpc_common_attach(), initialize the dev->board_name early and
use that instead of DRV_NAME when allocating the resources.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 22 Mar 2013 16:45:41 +0000 (09:45 -0700)]
staging: comedi: ni_labpc: move declaration of local var 'dma_flags'
In labpc_common_attach(), move the declaration of the local variable
'dma_flags' to remove the need for the extra #ifdef/#endif.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>