Xenia Ragiadakou [Wed, 19 Jun 2013 01:58:06 +0000 (04:58 +0300)]
staging: rtl8192u: fix spaces around ',' in r819xU_phy.c
This patch fixes the whitespace around ',' to meet the
linux kernel coding style.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Wed, 19 Jun 2013 01:58:05 +0000 (04:58 +0300)]
staging: rtl8192u: remove variable 'Ret' in r819xU_phy.c
This patch removes variable 'Ret' from rtl8192_QueryBBReg()
since its value is returned immediately after it is
assigned. The name 'Ret', anyway, does not give any
insight and the function description comment is sufficiently
informative regarding the returned value.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Wed, 19 Jun 2013 02:29:59 +0000 (10:29 +0800)]
Staging: netlogic: fix missing free_netdev() on error in xlr_net_probe()
Fix missing free_netdev() before return from function xlr_net_probe()
in the devm_ioremap_resource() error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chad Williamson [Tue, 18 Jun 2013 03:32:05 +0000 (22:32 -0500)]
Staging: silicom: move more assignments out of if conditions
Remove more assignments from if-statement conditions in bpctl_mod.c,
resolving checkpatch.pl errors. Those that remain need more attention
than I'm presently prepared to give them.
Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chad Williamson [Tue, 18 Jun 2013 03:32:04 +0000 (22:32 -0500)]
Staging: silicom: move assignments out of if conditions
Remove a bunch of assignments from if-statement conditions in
bpctl_mod.c, resolving checkpatch.pl errors. (This isn't all of
them, but the patch is getting rather long...)
Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chad Williamson [Tue, 18 Jun 2013 03:32:02 +0000 (22:32 -0500)]
Staging: silicom: remove unnecessary braces in bpctl_mod.c
Remove unnecessary braces in bpctl_mod.c, resolving checkpatch.pl
warnings.
Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:41 +0000 (05:29 +0300)]
staging: rtl8192u: rename general variables in r819xU_phy.c
This patch renames the following variables:
- dwRegAddr and RegAddr into reg_addr
- dwData and Data into data
- BitShift into bitshift
- Offset into offset
- NewOffset into new_offset
- Bandwidth into bandwidth
The renaming was done to remove camel case and
unnecessary 'dw' prefix from the above variable names.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:40 +0000 (05:29 +0300)]
staging: rtl8192u: rename *BitMask variables in r819xU_phy.c
This patch renames BitMask and dwBitMask variables into
bitmask to remove camel case.
dwBitMask in the given context can be renamed into simply
bitmask since its number of bits (dw->32) can be deduced
by its type which is u32.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:39 +0000 (05:29 +0300)]
staging: rtl8192u: replace *Value variables in r819xU_phy.c
This patch renames the variables OriginalValue, NewValue,
Original_Value, New_Value and retValue to reg, and
the variables bRegValue and dwRegValue to reg_u8 and
reg_u32, respectively. This is done primarily in
order to reduce the variable name length and consequently
line length.
Also, it replaces the pair of Original and New variables
with one variable.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:38 +0000 (05:29 +0300)]
staging: rtl8192u: fix spaces around relational operators in r819xU_phy.c
This patch fixes the whitespace around relational operators
to meet the linux kernel coding style.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:37 +0000 (05:29 +0300)]
staging: rtl8192u: fix spaces around ';' in r819xU_phy.c
This patch fixes the whitespace around ';' to meet the
linux kernel coding style.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Tue, 18 Jun 2013 02:29:36 +0000 (05:29 +0300)]
staging: rtl8192u: fix spaces around '=' in r819xU_phy.c
This patch fixes the whitespace around the assignment
operator to meet linux kernel coding style.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Markus Niebel [Tue, 18 Jun 2013 01:23:58 +0000 (09:23 +0800)]
staging: imx_drm: imx_ldb: fix 18 bit format
Since 18 bit is supported as datawidth in device tree it should be
supported in driver. Beside the LDB channel the IPU channel has also
to be configured to use BGR666.
Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sascha Hauer [Tue, 18 Jun 2013 01:23:57 +0000 (09:23 +0800)]
staging: drm/imx: Add LDB support
This adds support for the LVDS Display Bridge contained
in i.MX5 and i.MX6 SoCs.
Bit mapping, data width, and video timings are configurable
via device tree. Dual-channel mode is supported for a single
high-resolution source.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Jones [Tue, 18 Jun 2013 02:26:40 +0000 (22:26 -0400)]
staging/rtl8192u: remove commented out __list_for_each usage
Also remove another commented out open-coded list manipulation while we're there.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dave Jones [Tue, 18 Jun 2013 02:26:46 +0000 (22:26 -0400)]
staging/rtl8187se: Convert __list_for_each use to list_for_each
Also remove commented out list manipulation
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Mon, 17 Jun 2013 23:36:20 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: eliminate printk()s
Replace one printk() with dev_dbg(), and delete the other.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Mon, 17 Jun 2013 23:36:18 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: delete commented-out code
Delete commented-out code.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Mon, 17 Jun 2013 23:36:19 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: reformat long comments
Fix some comments to fit into 80 colums.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Mon, 17 Jun 2013 23:36:17 +0000 (02:36 +0300)]
staging: octeon-usb: octeon-hcd: use dev_dbg
Replace DEBUG macros with dev_dbg. Some less useful are completely
deleted.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lorenz Haspel [Mon, 17 Jun 2013 16:26:25 +0000 (18:26 +0200)]
silicom: checkpatch: trailing statements
fixed checkpatch error:
trailing statements that should be on next line
Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lorenz Haspel [Mon, 17 Jun 2013 16:26:24 +0000 (18:26 +0200)]
silicom: checkpatch: fixed whitespace errors
started cleanfile
also fixed some other whitespace errors cleanfile didn't find
Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bernd Bassimir [Fri, 14 Jun 2013 14:55:58 +0000 (16:55 +0200)]
staging: serqt_usb2: lines over 80 characters fixed
Changed name of one variable, so that all lines are now below 80
characters.
Signed-off-by: Bernd Bassimir <bassimir.kernel@gmx.de>
Signed-off-by: Nico Doerr <nico.doerr@hawo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bernd Bassimir [Fri, 14 Jun 2013 14:55:57 +0000 (16:55 +0200)]
staging: serqt_usb2: Fixed coding style CamelCases
Changed names of several variables, that contained CamelCases.
Signed-off-by: Bernd Bassimir <bassimir.kernel@gmx.de>
Signed-off-by: Nico Doerr <nico.doerr@hawo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:08 +0000 (07:29 +0300)]
staging: rtl8192u: fix function arguments position in r819xU_phy.c
This patch fixes the alignment of function arguments to make
it uniform across the driver trying to keep the line size
below 80 characters.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:07 +0000 (07:29 +0300)]
staging: rtl8192u: fix spaces around ( and ) in r819xU_phy.c
This patch removes whitespace after ')' and before ')'
following the linux kernel coding style conventions.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:06 +0000 (07:29 +0300)]
staging: rtl8192u: remove commented-out code in r819xU_phy.c
This patch removes commented-out code to improve code
readability.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:05 +0000 (07:29 +0300)]
staging: rtl8192u: fix spaces around for and while in r819xU_phy.c
This patch fixes whitespace around 'for' and 'while'
following the linux kernel coding style conventions.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:04 +0000 (07:29 +0300)]
staging: rtl8192u: fix spaces around 'if' in r819xU_phy.c
This patch fixes whitepace around 'if' following the linux
kernel coding style convention.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:03 +0000 (07:29 +0300)]
staging: rtl8192u: fix return statements in r819xU_phy.c
This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:02 +0000 (07:29 +0300)]
staging: rtl8192u: fix braces in r819xU_phy.c
This patch fixes the brace position and the whitespace
around braces.
That corrects the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
ERROR: space required after that close brace '}'
Also, it removes completely an if(0) statement,
instead of correcting its braces.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Xenia Ragiadakou [Sat, 15 Jun 2013 04:29:01 +0000 (07:29 +0300)]
staging: rtl8192u: fix bitshift calculation in r819xU_phy.c
This patch uses the ffs linux built-in routine in the
computation of the bitshift to take advantage of
architecture specific instructions that implement this
computation more efficiently.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 17 Jun 2013 21:34:39 +0000 (22:34 +0100)]
staging: vt6656: mac.c MACvDisableKeyEntry remove dead code wOffset
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 17 Jun 2013 21:31:00 +0000 (22:31 +0100)]
staging: vt6656: mac.c Remove commented out dead code
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Mon, 17 Jun 2013 21:19:54 +0000 (22:19 +0100)]
staging: vt6656: mac.c pbyData Remove magic number array size
Array size always equals ARRAY_SIZE of pbyData
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 12 Jun 2013 22:00:38 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: make internal variable static
Make an internal variable static.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 12 Jun 2013 22:00:35 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: fix some includes
Avoid including from "asm/".
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 12 Jun 2013 22:00:33 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: add missing braces
One else branch was missing braces.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 12 Jun 2013 22:00:31 +0000 (01:00 +0300)]
staging: octeon-usb: octeon-hcd: use tabs for code indent
Replace spaces with tabs where possible.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobias Polzer [Thu, 13 Jun 2013 21:00:35 +0000 (23:00 +0200)]
staging: csr: Fix obvious logic error in staging/csr
In uf_process_ma_packet_req() (staging/csr/unifi_pdu_processing.c), the
test for
(staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet !=
CSR_WIFI_TIM_RESETTING)
obviously makes no sense and causes GCC to emit a warning if
-Wlogical-op is enabled.
As suggested in the referenced bug report, || was replaced by &&.
References: https://bugzilla.kernel.org/show_bug.cgi?id=46571
Reported-By: David Binderman <dcb314@hotmail.com>
Signed-off-by: Tobias Polzer <tobias.polzer@fau.de>
Signed-off-by: Dominik Paulus <dominik.paulus@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Li RongQing [Thu, 13 Jun 2013 12:12:14 +0000 (20:12 +0800)]
staging: csr: fix the reset of skb mac header
mac_header can be offset if NET_SKBUFF_DATA_USES_OFFSET is set, so
we should call skb_reset_mac_header to reset mac_header.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rupesh Gujare [Wed, 12 Jun 2013 13:00:52 +0000 (14:00 +0100)]
staging: ozwpan: remove event tracing code.
Removes event tracing code as it can be replaced
by in-kernel tracing infrastructure.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laura Lawniczak [Sun, 9 Jun 2013 21:11:30 +0000 (23:11 +0200)]
staging: keucr: removed unnecessary variables and comments
blen and bn were only used in commented code fragments.
since comments should be informative and not for storing old
code, both, commented code and variables, were removed.
Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Wed, 12 Jun 2013 23:23:14 +0000 (16:23 -0700)]
staging: comedi: addi_apci_3xxx: only allocate needed subdevices
The number of subdevices needed by a given board supported by this
driver can cary from 2 (for the apci3500) to a maximum of 5. Currently
this driver always allocates 7 subdevices and sets the subdevice type
to COMEDI_SUBD_UNUSED for the ones that are not needed.
Calculate the actual number of needed subdevices from the boardinfo
and only allocate and setup the ones that are used.
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 [Wed, 12 Jun 2013 23:22:53 +0000 (16:22 -0700)]
staging: comedi: addi_apci_3xxx: fix the analog input subdevice
The analog input subdevice support functions in hwdrv_apci3xxx.c
do not follow the comedi API.
The (*insn_config) function overrides the INSN_CONFIG_DIO_INPUT
instruction as an internal APCI3XXX_CONFIGURATION instruction. The
APCI3XXX_CONFIGURATION instruction requires 4 data parameters but
the comedi core sanity checks the INSN_CONFIG_DIO_INPUT instruction
which only has 1 data parameter. Because of this the (*insn_config)
function can never be called.
The (*insn_read) function is supposed to do "one-shot" or "software-
triggered" reads and return the data. The function in hwdrv_apci3xxx.c
does do this but it also is used to optionally start a "hardware-
triggered" conversion. Hardware-triggered conversions should be done
with the comedi_async command functions.
Delete the hwrdv_apci3xxx.c file and fix the analog input subdevice
in the driver by:
1) add a new (*insn_read) function for "one-shot" reads
2) implement the (*do_cmdtest) and (*do_cmd) functions for
"hardware-triggered" asyncronous reads
3) fix the interrupt handler to return the read data via the
comedi_async buffer
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 [Wed, 12 Jun 2013 23:22:33 +0000 (16:22 -0700)]
staging: comedi: addi_apci_3xxx: stub in analog input command support
The analog input subdevice in this driver is broken. The attach of
this driver requests the irq and sets the dev->read_subdev to the
analog input subdevice but it does not setup the subdevice to support
commands.
Stub in the command support functions so we can fix the subdevice.
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 [Wed, 12 Jun 2013 23:22:14 +0000 (16:22 -0700)]
staging: comedi: addi_apci_3xxx: tidy up analog input subdevice init
For aesthetic reasnons, add some whitespace to the analog input
subdevice initialization.
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 [Wed, 12 Jun 2013 23:21:53 +0000 (16:21 -0700)]
staging: comedi: addi_apci_3xxx: remove 'b_SingleDiff' private data
The analog reference desired for the acquisition is stored in the
insn->chanspec that is passed to the (*insn_read) function. There is
no need to use a private data variable to hold the desired analog
reference that is set in the (*insn_config).
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 [Wed, 12 Jun 2013 23:21:33 +0000 (16:21 -0700)]
staging: comedi: addi_apci_3xxx: remove 'i_NbrAiChannelDiff' boardinfo
The number of differential analog input channels is always half the
number of single-ended channels, 'ai_n_chan', or all the channels
if the board does not support single-ended channels. We can use the
'ai_subdev_flags' boardinfo to determine if the board does not support
single-ended channels.
To simplify the boardinfo, remove the 'i_NbrAiChannelDiff' and just
use 'ai_n_chan' to specify the number of channels.
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 [Wed, 12 Jun 2013 23:21:12 +0000 (16:21 -0700)]
staging: comedi: addi_apci_3xxx: rename 'i_NbrAiChannel'
Rename this CamelCase boardinfo variable.
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 [Wed, 12 Jun 2013 23:20:54 +0000 (16:20 -0700)]
staging: comedi: addi_apci_3xxx: rename 'ui_MinAcquisitiontimeNs'
Rename this CamelCase boardinfo variable.
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 [Wed, 12 Jun 2013 23:20:32 +0000 (16:20 -0700)]
staging: comedi: addi_apci_3xxx: clarify 'b_AvailableConvertUnit'
This boardinfo defines the conversion time bases that the analog input
subdevice supports (ns, us, ms).
Add some defines to get rid of the magic numbers and clarify the code.
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 [Wed, 12 Jun 2013 23:20:11 +0000 (16:20 -0700)]
staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_AnalogInputConfigOperatingMode()
The analog input subdevice is broken in this driver. To help fix
it, tidy up this (*insn_config) helper function.
Rename the CamelCase function and all the CamelCase local variables.
Refactor the sanity checks to make the function a bit more concise
and remove the printk noise.
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 [Wed, 12 Jun 2013 23:19:50 +0000 (16:19 -0700)]
staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnConfigAnalogInput()
The analog input subdevice is broken in this driver. To help fix
it, tidy up this (*insn_config) function.
Rename the CamelCase function.
Move the (insn->n == 4) test from i_APCI3XXX_AnalogInputConfigOperatingMode()
to this function.
Make the function a bit more concise and remove the printk noise.
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 [Wed, 12 Jun 2013 23:19:30 +0000 (16:19 -0700)]
staging: comedi: addi_apci_3xxx: properly set the analog input subdev_flags
Some of the boards supported by this driver only have differential
analog inputs. Add a new boardinfo, 'ai_subdev_flags', to allow
properly setting the subdev_flags for the analog input subdevice.
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 [Wed, 12 Jun 2013 23:19:10 +0000 (16:19 -0700)]
staging: comedi: addi_apci_3xxx: rename boardinfo 'i_AiMaxData'
Rename this CamelCase boardinfo. Also, change its type to match
the type of comedi_subdevice 'maxdata'.
For aesthetic reasons, change the values to hex since this is more
common for the 'maxdata' values in comedi drivers.
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 [Wed, 12 Jun 2013 23:18:51 +0000 (16:18 -0700)]
staging: comedi: addi_apci_3xxx: rename boardinfo 'pc_DriverName'
Rename this CamelCase boardinfo.
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 [Wed, 12 Jun 2013 23:18:31 +0000 (16:18 -0700)]
staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo
The analog input s->len_chanlist for the boards supported by this driver
should always be the number of channels (s->n_chan). Use that instead
and remove the 'i_AiChannelList' from the boardinfo.
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 [Wed, 12 Jun 2013 23:18:11 +0000 (16:18 -0700)]
staging: comedi: addi_apci_3xxx: remove 'tsk_Current' from private data
The interrupt function should be using comedi_event() to let the user
know data is available from the analog input subdevice.
The analog input subdevice is currently broken and nothing sets
tsk_Current anyway so 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 [Wed, 12 Jun 2013 23:17:49 +0000 (16:17 -0700)]
staging: comedi: addi_apci_3xxx: rename 'dw_AiBase' in private data
This variable holds the ioremap'ed PCI bar 3 used to read/write the
analog input and output registers. Rename it to simply '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 [Wed, 12 Jun 2013 23:17:28 +0000 (16:17 -0700)]
staging: comedi: addi_apci_3xxx: remove 'iobase' from private data
The private data 'iobase' is the same as the comedi_device 'iobase'.
Use the one in the comedi_device instead.
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 [Wed, 12 Jun 2013 23:17:08 +0000 (16:17 -0700)]
staging: comedi: addi_apci_3xxx: remove 'i_IobaseReserved' from private data
This variable is not used by the driver. 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 [Wed, 12 Jun 2013 23:16:47 +0000 (16:16 -0700)]
staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnReadAnalogInput()
The analog input subdevice in this driver is broken. It abuses the
comedi API and will not work as-is. Start cleaning it up so it can
be fixed.
Rename the CamelCase function and the local variables.
Refactor the function to remove the indents. Most of the indents are
left over from the previous patches.
Invert the early tests to provide a quick exit from the function.
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 [Wed, 12 Jun 2013 23:16:25 +0000 (16:16 -0700)]
staging: comedi: addi_apci_3xxx: remove sanity checks in i_APCI3XXX_InsnReadAnalogInput()
The comedi core validates the insn->chanspec channel and range before
calling the subdevice (*insn_read) function.
Remove the unnecessary sanity checks.
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 [Wed, 12 Jun 2013 23:16:05 +0000 (16:16 -0700)]
staging: comedi: addi_apci_3xxx: remove 'b_AiInitialisation' from private data
This variable is set during the attach of the board and never cleared
so the test in i_APCI3XXX_InsnReadAnalogInput() will always succeed.
Just remove the variable to help with cleaning up 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 [Wed, 12 Jun 2013 23:15:46 +0000 (16:15 -0700)]
staging: comedi: addi_apci_3xxx: remove unused define
This define is not used by the driver. 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 [Wed, 12 Jun 2013 23:15:27 +0000 (16:15 -0700)]
staging: comedi: addi_apci_3xxx: refactor the ttl digital i/o support
Currently, the subdevice functions used to configure and read/write the
ttl digital i/o ports is way over to complicated. The (*insn_config)
function also abuses the comedi API by overriding the instruction
command passed in data[0].
Fix the ttl digital i/o support to work like the comedi core expects.
The (*insn_config) function supports the three instructions common for
COMEDI_SUBD_DIO subdevices:
INSN_CONFIG_DIO_INPUT - configure the specified channel as input
INSN_CONFIG_DIO_OUTPUT - configure the specified channel as output
INSN_CONFIG_DIO_QUERY - returns the status of the specified channel
Port 0 (channels 0-7) is always input
Port 1 (channels 8-15) is always output
Port 2 (channels 9-23) are programmable i/o (all channels are input or output)
The (*insn_bits) function allows writing to the output channels and returns
the state of all channels.
The (*insn_read) and (*insn_write) functions are not required. The comedi
core will emulate them using the (*insn_bits) function.
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 [Wed, 12 Jun 2013 23:15:07 +0000 (16:15 -0700)]
staging: comedi: addi_apci_3xxx: absorb i_APCI3XXX_InsnWriteAnalogOutput()
Rename this CamelCase function and absorb it from hwdrv_apci3xxx.c
directly into the driver.
Tidy up the analog output subdevice init by adding some whitespace.
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 [Wed, 12 Jun 2013 23:14:47 +0000 (16:14 -0700)]
staging: comedi: addi_apci_3xxx: refactor 'i_NbrAoChannel' boardinfo
The boards that have analog outputs always have 4 channels.
Remove the 'i_NbrAoChannel' data from the boardinfo and add a bit
field to indicate that the board 'has_ao'. Use that to conditionally
initialize the subdevice and open code the s->n_chan value of 4.
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 [Wed, 12 Jun 2013 23:14:25 +0000 (16:14 -0700)]
staging: comedi: addi_apci_3xxx: refactor i_APCI3XXX_InsnWriteAnalogOutput()
Rename the CamelCase local variables.
The comedi core validates the insn->chanspec to make sure the channel
number and range are valid for the subdevice. The extra checks in this
function are not required.
(*insn_write) functions are supposed to write all the data passed
in the data pointer (insn->n values) then return the number of data
values written of an errno. Fix this function to work like the core
expects.
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 [Wed, 12 Jun 2013 23:14:02 +0000 (16:14 -0700)]
staging: comedi: addi_apci_3xxx: tidy up the ttl digital i/o subdevice init
For aesthetic reasons, add some whitespace to the initialization of the
ttl digital i/o subdevices.
Fix the subdev_flags for the subdevice. The SDF_GROUND and SDF_COMMON
flags only apply to analog subdevices.
Fix the s->iobits for the subdevice. According to the datasheet:
Port 0 (channels 0-7) are always outputs
Port 1 (channels 8-15) are always inputs
Port 2 (channels 9-23) are programmable i/o (default to inputs)
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 [Wed, 12 Jun 2013 23:13:39 +0000 (16:13 -0700)]
staging: comedi: addi_apci_3xxx: tidy up the digital in and out subdevice init
For aesthetic reasons, add some whitespace to the initialization of the
digital input and output subdevices.
Fix the subdev_flags for both subdevices. The SDF_GROUND and SDF_COMMON
flags only apply to analog subdevices. Digital output subdevices do not
need the SDF_READABLE flag set.
Remove the initialization of s->io_bits. It only has meaning for
COMEDI_SUBD_DIO subdevices.
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 [Wed, 12 Jun 2013 23:13:19 +0000 (16:13 -0700)]
staging: comedi: addi_apci_3xxx: analog output 'maxdata' is always 12-bit
The boards that have analog outputs always have 12-bit resolution.
Remove the 'i_AoMaxdata' data from the boardinfo and open code the
s->maxdata. Use the hex value for the resolution since that is more
common in comedi drivers.
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 [Wed, 12 Jun 2013 23:12:58 +0000 (16:12 -0700)]
staging: comedi: addi_apci_3xxx: refactor 'i_NbrTTLChannel' boardinfo
The boards that have ttl input and output channels always have 24
channels.
Remove the 'i_NbrTTLChannel' data from the boardinfo and add a bit
field to indicate that the board 'has_ttl_io'. Use that to conditionally
initialize the subdevice and open code the s->n_chan value of 24.
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 [Wed, 12 Jun 2013 23:12:37 +0000 (16:12 -0700)]
staging: comedi: addi_apci_3xxx: refactor 'i_NbrD[io]Channel' boardinfo
The boards that have digital input and output channels always have
4 inputs and 4 outputs.
Remove the 'i_NbrD[io]Channel' data from the boardinfo and add two
bit fields to indicate that the board 'has_dig_in' and 'has_dig_out'.
Use those to conditionally initialize the subdevices and open code
the s->n_chan value of 4 for both subdevices.
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 [Wed, 12 Jun 2013 23:12:07 +0000 (16:12 -0700)]
staging: comedi: addi_apci_3xxx: remove 'i_IorangeBase1' from boardinfo
This data in the boardinfo 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 [Wed, 12 Jun 2013 23:11:46 +0000 (16:11 -0700)]
staging: comedi: addi_apci_3xxx: move the copyright info to the driver
Move the copyright information from hwdrv_apci3xxx.c to the actual
driver, addi_apci_3xxx.c.
Reformat the information to 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 [Wed, 12 Jun 2013 23:11:24 +0000 (16:11 -0700)]
staging: comedi: addi_apci_3xxx: remove some unused includes
This driver does not use anything provided by these includes.
Remove them.
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 [Wed, 12 Jun 2013 23:11:03 +0000 (16:11 -0700)]
staging: comedi: addi_apci_3xxx: remove COMEDI_SUBD_TTLIO
This driver abuses the enum comedi_subdevice_type by redefining
enum 11 - COMEDI_SUBD_SERIAL as COMEDI_SUBD_TTLIO. The subdevice
that uses COMEDI_SUBD_TTLIO is a TTL Digital Input/Output subdevice.
Remove COMEDI_SUBD_TTLIO and just use COMEDI_SUBD_DIO as the
subdevice type.
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 [Wed, 12 Jun 2013 23:10:37 +0000 (16:10 -0700)]
staging: comedi: addi_apci_3xxx: introduce a local private data definition
The struct addi_private definition from the addi-data "common" code is
very bloated. Introduce a local struct apci3xxx_private that just has
the data needed by this driver.
Add a couple includes that this driver depends on and remove the include
of "addi-data/addi_common.h" since this driver no longer depends on 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 [Wed, 12 Jun 2013 23:10:16 +0000 (16:10 -0700)]
staging: comedi: addi_apci_3xxx: introduce a private boardinfo definition
The struct addi_board definition from the addi-data "common" code is
very bloated. Introduce a private struct apci3xxx_boardinfo that just
has the data needed by this driver.
Move the #include "addi-data/hwdrv_apci3xxx.c" so it will have the new
struct definition.
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 [Wed, 12 Jun 2013 23:09:54 +0000 (16:09 -0700)]
staging: comedi: addi_apci_3xxx: remove (*insn_*) callbacks from boardinfo
The same subdevice callbacks are used by all the boards supported by
this driver. Remove the information from the boardinfo and initialize
the subdevices directly.
Remove the callback initializations that are always = NULL.
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 [Wed, 12 Jun 2013 23:09:29 +0000 (16:09 -0700)]
staging: comedi: addi_apci_3xxx: remove need for s_EeParameters
The boards supported by this driver do not have an eeprom. Remove the
need for the devpriv->s_EeParameters values by just using the values
from the boardinfo 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 [Wed, 12 Jun 2013 23:09:07 +0000 (16:09 -0700)]
staging: comedi: addi_apci_3xxx: digital output 'maxdata' is always '1'
Digital output subdevices always have a 'maxdata' of '1'. Remove the
'i_DoMaxData' boardinfo and just open code the value.
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 [Wed, 12 Jun 2013 23:08:47 +0000 (16:08 -0700)]
staging: comedi: addi_apci_3xxx: boards do not have an eeprom
All of the boards supported by this driver have a PCI 9054 chip
without an attached eeprom.
Remove the unused support code that reads the eeprom.
Also, remove the unnecessary 'i_PCIEeprom' and 'pc_EepromChip' data
from the boardinfo.
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 [Wed, 12 Jun 2013 23:08:14 +0000 (16:08 -0700)]
staging: comedi: addi_apci_3xxx: boards do not have a timer
None of the boards supported by this driver have a timer. Remove
the unnecessary code.
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 [Wed, 12 Jun 2013 23:07:48 +0000 (16:07 -0700)]
staging: comedi: addi_apci_3xxx: driver does not use dma
This driver does not use dma. Remove the unnecessary code.
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 [Wed, 12 Jun 2013 23:07:25 +0000 (16:07 -0700)]
staging: comedi: addi_apci_3xxx: simplify the PCI bar reading
The boards supported by this driver all have an ADDIDATA_9054 eeprom.
Knowing this we can simplify the code that reads the PCI bars to get
the iobase address used by the 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 [Wed, 12 Jun 2013 23:07:04 +0000 (16:07 -0700)]
staging: comedi: addi_apci_3xxx: absorb the private comedi_lrange tables
All the boards supported by this driver have the same private
analog input and output ranges. Absorb the comedi_lrange tables
from hwdrv_apci3xxx.c directly into the driver. For aesthetic
reasons, rename the tables so they have namespace associated
with the driver.
Remove the 'pr_AiRangelist' and 'pr_AoRangelist' data from the
boardinfo and use the range tables directly when initializing
the subdevices.
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 [Wed, 12 Jun 2013 23:06:36 +0000 (16:06 -0700)]
staging: comedi: addi_apci_3xxx: absorb v_APCI3XXX_Interrupt()
All the boards supported by this driver use the same 'interrupt'
callback in the boardinfo. Absorb the interrupt function from
hwdrv_apci3xxx.c directly into the driver. Rename the CamelCase
function to apci3xxx_irq_handler().
Remove v_ADDI_Interrupt(), which indirectly called the interrupt
function, and use apci3xxx_irq_handler instead when requesting
the irq. Remove the 'interrupt' callback from the boardinfo.
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 [Wed, 12 Jun 2013 23:06:02 +0000 (16:06 -0700)]
staging: comedi: addi_apci_3xxx: tidy up v_APCI3XXX_Interrupt()
Remove the extra comments and rename the CamelCase local variables.
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 [Wed, 12 Jun 2013 23:05:42 +0000 (16:05 -0700)]
staging: comedi: addi_apci_3xxx: absorb apci3xxx_di_insn_bits()
All the boards supported by this driver that have digital inputs use
the same 'di_bits' callback in the boardinfo. Absorb the function from
hwdrv_apci3xxx.c directly into the driver.
Remove the 'di_bits' callback from the boardinfo and use the function
directly to set the subdevice (*insn_bits).
None of the boards supported by this driver have a 'di_config', 'di_read',
or 'io_write' callback. Remove the unnecessary setting of the subdevice
callbacks.
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 [Wed, 12 Jun 2013 23:05:13 +0000 (16:05 -0700)]
staging: comedi: addi_apci_3xxx: absorb apci3xxx_do_insn_bits()
All the boards supported by this driver that have digital outputs use
the same 'do_bits' callback in the boardinfo. Absorb the function from
hwdrv_apci3xxx.c directly into the driver.
Remove the 'do_bits' callback from the boardinfo and use the function
directly to set the subdevice (*insn_bits).
None of the boards supported by this driver have a 'do_config', 'do_write',
or 'do_read' callback. Remove the unnecessary setting of the subdevice
callbacks.
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 [Wed, 12 Jun 2013 23:04:45 +0000 (16:04 -0700)]
staging: comedi: addi_apci_3xxx: absorb apci3xxx_reset()
All the boards supported by this driver use the same 'reset' callback
in the boardinfo. Absorb the reset function, apci3xxx_reset(), from
hwdrv_apci3xxx.c directly into the driver.
Remove i_ADDI_Reset(), which indirectly called the reset function, and
just call apci3xx_reset() directly. Remove the 'reset' callback from
the boardinfo.
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 [Wed, 12 Jun 2013 23:04:24 +0000 (16:04 -0700)]
staging: comedi: addi_apci_3xxx: separate from addi_common.c
This driver currently uses the addi-data "common" code and contains
a lot of bloat.
Copy the code in addi_common.c to this driver and remove the #include
that caused it to be compiled with the driver. This will allow removing
the bloat.
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 [Wed, 12 Jun 2013 23:04:00 +0000 (16:04 -0700)]
staging: comedi: addi_apci_3xxx: clean up i_APCI3XXX_Reset()
Rename the CamelCase function and variables.
Remove the extra comments. Leave the main comments to help with further
cleanup of 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, 11 Jun 2013 18:32:29 +0000 (11:32 -0700)]
staging: comedi: drivers: let core handle freeing s->private
Introduce a new subdevice runflags, SRF_FREE_SPRIV, and a new helper
function, comedi_set_spriv(), that the drivers can use to set the
comedi_subdevice private data pointer. The helper function will also
set SRF_FREE_SPRIV to allow the comedi core to automatically free the
subdevice private data during the cleanup_device() stage of the detach.
Currently s->private is only allocated by the 8255, addi_watchdog,
amplc_dio200_common, and ni_65xx drivers. All users of those drivers
can then have the comedi_spriv_free() calls removed and in many cases
the (*detach) can then simply be the appropriate comedi core provided
function.
The ni_65xx driver uses a helper function, ni_65xx_alloc_subdevice_private(),
to allocate the private data. Refactor the function to return an errno
or call comedi_set_spriv() instead of returning a pointer to the private
data and requiring the caller to handle 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>
Chad Williamson [Mon, 17 Jun 2013 00:05:23 +0000 (19:05 -0500)]
Staging: silicom: move symbol exports beneath definitions in bpctl_mod.c
Move the EXPORT_SYMBOL macros in bpctl_mod.c beneath the definitions
they refer to, resolving checkpatch.pl warnings. While we're at it, use
EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS.
Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chad Williamson [Mon, 17 Jun 2013 00:05:24 +0000 (19:05 -0500)]
Staging: silicom: move symbol exports beneath definitions in bypass.c
Move the EXPORT_SYMBOL macros in bypass.c beneath the definitions
they refer to, resolving checkpatch.pl warnings. While we're at it, use
EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS.
Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chad Williamson [Mon, 17 Jun 2013 00:05:25 +0000 (19:05 -0500)]
Staging: silicom: remove the EXPORT_SYMBOL_NOVERS macro
Since all references to EXPORT_SYMBOL_NOVERS have been removed,
we can remove its definition from bp_mod.h and bypasslib/bplibk.h.
Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>