cascardo/linux.git
9 years agoMerge tag 'iio-for-3.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 19 Jun 2014 03:02:33 +0000 (20:02 -0700)]
Merge tag 'iio-for-3.17a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new drivers, cleanups and functionality for the 3.17 cycle.

New drivers
* t5403 barometric pressure sensor
* kxcjk1013 accelerometer (with a locking followup fix).
* ak09911 digital compass

Documentation
* ABI docs for proximity added (interface has been there a long time but
  somehow snuck through without being documented)
* Move iio-trig-sysfs documentation out of staging (got left behind when
  the driver moved some time ago).

Cleanups
 * drop the timestamp argument from iio_trigger_poll(_chained) as
   nothing has been done with it for some time.
 * ad799x kerneldoc for ad799x_chip brought up to date.
 * replace a number of reimplementations of the GENMASK macro and
   use the BIT macro to cleanup a few locations.
 * bring the iio_event_monitor example program up to date with new
   device types.
 * fix some incorrect function prototypes in iio_utils.h example code.
 * INDIO_RING_TRIGGERED to INDIO_BUFFER_TRIGGERED fix in docs. This
   got left behind after we renamed it a long time back.
 * fix error handling in the generic_buffer example program.
 * small tidy ups in the iio-trig-periodic-rtc driver.
 * Allow reseting iio-trig-periodic-rtc frequency to 0 (default) after
   it has changed.
 * Trivial tidy ups in coding style in iio_simply_dummy

9 years agostaging: lustre: lclient: lcommon_cl.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:56 +0000 (18:23 +1000)]
staging: lustre: lclient: lcommon_cl.c fixing coding style issues

fixed: WARNING: suspect code indent for conditional statements (32, 32)

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: lcommon_cl.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:55 +0000 (18:23 +1000)]
staging: lustre: lclient: lcommon_cl.c fixing coding style issues

fixed: WARNING: line over 80 characters, used a new variable 'size_index' to
store the offset. Replaced "unsigned long" with  "loff_t" type for
'cur_index'. Removed the parenthesis around the second part of the if statement following the '||' as its not required.

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: lcommon_cl.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:54 +0000 (18:23 +1000)]
staging: lustre: lclient: lcommon_cl.c fixing coding style issues

fixed: ERROR: inline keyword should sit between storage class and type

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: lcommon_cl.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:53 +0000 (18:23 +1000)]
staging: lustre: lclient: lcommon_cl.c fixing coding style issues

fixed:  ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: lcommon_cl.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:52 +0000 (18:23 +1000)]
staging: lustre: lclient: lcommon_cl.c fixing coding style issues

fixed: WARNING: Missing a blank line after declarations

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: lcommon_misc.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:51 +0000 (18:23 +1000)]
staging: lustre: lclient: lcommon_misc.c fixing coding style issues

fixed warning:
* WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count,
LOV_MAX_STRIPE_COUNT)

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: glimpse.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:50 +0000 (18:23 +1000)]
staging: lustre: lclient: glimpse.c fixing coding style issues

fixed "WARNING: labels should not be indented"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lclient: glimpse.c fixing coding style issues
Anil Belur [Wed, 18 Jun 2014 08:23:49 +0000 (18:23 +1000)]
staging: lustre: lclient: glimpse.c fixing coding style issues

Fixed "ERROR: need consistent spacing around '+' (ctx:WxV)"

Signed-off-by: Anil Belur <askb23@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix sparse warnings for undeclared symbols
Scott Weir [Mon, 16 Jun 2014 10:44:51 +0000 (20:44 +1000)]
staging: lustre: Fix sparse warnings for undeclared symbols

This patch fixes the sparse warnings in drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c:
sec_lproc.c:58:6: warning: symbol 'sec_flags2str' was not declared. Should it be static?

Signed-off-by: Scott Weir <sjw0410@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: remove memset(0) after LIBCFS_ALLOC
Vitaly Osipov [Sat, 14 Jun 2014 07:29:51 +0000 (17:29 +1000)]
staging: lustre: remove memset(0) after LIBCFS_ALLOC

Joe Perches mentioned on driverdev-devel that memset after LIBCFS_ALLOC
is not necessary as it is already done during LIBCFS_ALLOC_POST. This
commit removes these unnecessary memsets. Based on the results of running
a cocci patch along the lines of:

@@
expression E1, E2;
@@

LIBCFS_ALLOC (E1,E2);
...
- memset(E1,0,E2);

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: removed spaces at the start of a line
Marc Fite [Thu, 12 Jun 2014 17:28:16 +0000 (19:28 +0200)]
staging: lustre: removed spaces at the start of a line

This is a patch in order to remove 2 lines with spaces at the start of the line.

Signed-off-by: Marc Fite <marc@fite.cat>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: fix sparse warnings for undeclared symbols
John Church [Mon, 2 Jun 2014 13:31:10 +0000 (14:31 +0100)]
staging: lustre: fix sparse warnings for undeclared symbols

This patch fixes the following sparse warnings for drivers/staging/lustre/lnet/lnet/router.c:

router.c:139:1: warning: symbol 'lnet_ni_notify_locked' was not declared. Should it be static?
router.c:277:1: warning: symbol 'lnet_add_route_to_rnet' was not declared. Should it be static?

Signed-off-by: John Church <sleeveroller@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agolustre/osc/osc_dev.c add a blank line after declarations
Honggang Li [Thu, 12 Jun 2014 07:13:39 +0000 (15:13 +0800)]
lustre/osc/osc_dev.c add a blank line after declarations

Signed-off-by: Honggang Li <enjoymindful@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agolustre/osc/osc_dev.c remove space between sizeof and open parenthesis
Honggang Li [Thu, 12 Jun 2014 07:13:38 +0000 (15:13 +0800)]
lustre/osc/osc_dev.c remove space between sizeof and open parenthesis

Signed-off-by: Honggang Li <enjoymindful@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: cfg80211.c: Fix sparse warnings
Tair Rzayev [Sat, 31 May 2014 20:33:59 +0000 (23:33 +0300)]
staging: wlan-ng: cfg80211.c: Fix sparse warnings

Include necessary header files to avoid "should be static" sparse warning

Signed-off-by: Tair Rzayev <tair.rzayev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: tidspbridge: Fix whitespace for pointers in function headers
Jeff Oczek [Sat, 14 Jun 2014 13:21:17 +0000 (09:21 -0400)]
staging: tidspbridge: Fix whitespace for pointers in function headers

Change style in function headers from 'type * ptr' to 'type *ptr'

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs
Jeff Oczek [Sat, 14 Jun 2014 13:21:16 +0000 (09:21 -0400)]
staging: tidspbridge: Add parameter names to function ptrs in struct dbll_attrs

Add more descriptive names to function pointers in definition of struct dbll_attrs

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/fwserial: (coding style) remove not needed return statements
Radek Dostal [Sat, 14 Jun 2014 14:13:09 +0000 (16:13 +0200)]
staging/fwserial: (coding style) remove not needed return statements

Style-only modifications to make checkpatch.pl -f a bit happier.
Fixes warning: "void function return statements are not generally useful"

Signed-off-by: Radek Dostal <rd@radekdostal.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/fwserial: (coding style) add blank line after every declaration
Radek Dostal [Sat, 14 Jun 2014 14:13:08 +0000 (16:13 +0200)]
staging/fwserial: (coding style) add blank line after every declaration

Style-only modifications to make checkpatch.pl -f a bit happier.
Fixes warning: "Missing a blank line after declarations"

Signed-off-by: Radek Dostal <rd@radekdostal.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: keucr: usb.c: add blank lines after declarations
Mathias Engan [Thu, 12 Jun 2014 18:58:12 +0000 (20:58 +0200)]
staging: keucr: usb.c: add blank lines after declarations

Add blank line after declarations in eucr_suspend and eucr_resume
as reported by checkpatch.

Signed-off-by: Mathias Engan <mathias.engan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: tidspbridge: use safer test on the result of find_first_zero_bit
Julia Lawall [Wed, 4 Jun 2014 09:07:54 +0000 (11:07 +0200)]
staging: tidspbridge: use safer test on the result of find_first_zero_bit

Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may
return a larger number than the maximum position argument if that position
is not a multiple of BITS_PER_LONG.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3;
statement S1,S2;
@@

e1 = find_first_zero_bit(e2,e3)
...
if (e1
- ==
+ >=
  e3)
S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: tidspbridge: pmgr: dspapi.c: Cleaning up uninitialized variable
Rickard Strandqvist [Tue, 3 Jun 2014 22:23:39 +0000 (00:23 +0200)]
staging: tidspbridge: pmgr: dspapi.c: Cleaning up uninitialized variable

There is a risk that the variables will be used without being initialized.
Has also improved error handling, after an email proposal from Dan Carpenter.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: style - use kmalloc_array(n, s, ...) instead of kmalloc(n*s, ...)
Wolfgang Ocker [Mon, 2 Jun 2014 20:48:06 +0000 (22:48 +0200)]
staging: comedi: style - use kmalloc_array(n, s, ...) instead of kmalloc(n*s, ...)

Fix a style issue reported by checkpatch.pl for the Eudyptula challenge

Signed-off-by: Wolfgang Ocker <weo@weo1.de>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: goldfish: fix coding style.
Hoang Tran [Mon, 16 Jun 2014 07:18:37 +0000 (15:18 +0800)]
staging: goldfish: fix coding style.

Using an else following a break or return can unnecessarily
indent code blocks.

This patch fixes coding style reported by checkpatch.pl, a part
of eudyptula challenge.

Signed-off-by: Hoang Tran <hoangtran.gwr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_stc.h: add read/write callbacks to struct ni_private
H Hartley Sweeten [Thu, 29 May 2014 17:56:32 +0000 (10:56 -0700)]
staging: comedi: ni_stc.h: add read/write callbacks to struct ni_private

The {read,write}[bwl] macros used to access the registers in the ni_atmio,
ni_mio_cs, and ni_pcimio drivers and the included ni_mio_common.c file all
rely on a local variable having a specific name. They also require some of
the ni_mio_common code to need a __maybe_unused tag on the devpriv local
variable.

Remove all the macros by converting them into private functions and storing
the callbacks in the private data.

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>
9 years agostaging: comedi: ni_stc.h: remove unused members from struct ni_private
H Hartley Sweeten [Thu, 29 May 2014 17:56:31 +0000 (10:56 -0700)]
staging: comedi: ni_stc.h: remove unused members from struct ni_private

Remove all the unsed members from the private data for the ni mio drivers.

The ao0p and ao1p members are only used in the ni_ao_reset() function and
the code is commented out. Remove them, and the commented out code, as well.

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>
9 years agostaging: comedi: ni_stc.h: remove NI_PRIVATE_COMMON macro
H Hartley Sweeten [Thu, 29 May 2014 17:56:30 +0000 (10:56 -0700)]
staging: comedi: ni_stc.h: remove NI_PRIVATE_COMMON macro

This macro is used to create the private data structure that is used by
the ni_atmio, ni_mio_cs, and ni_pcimio drivers. These drivers all include
the ni_mio_common.c source to provide most of the driver functionality.

The only driver specific information needed to convert the macro into a
proper struct definition is the MAX_N_CALDACS define. This define is used
to size a couple array members in the struct. The ni_atmio and ni_mio_cs
drivers both define MAX_N_CALDACS as 32. The ni_pcimio driver defines it
as (16+16+2). The ni_mio_common file only uses this define to sanity check
that the struct members are large enough for the number of channels in
the calibration subdevice.

Move the MAX_N_CALDACS define to ni_stc.h and set it to the largest number
of caldacs (34).

The ni_atmio and ni_mio_cs drivers also add one additional member to the
private data struct before using the NI_PRIVATE_COMMON macro.

For the ni_atmio driver, the struct pnp_dev pointer can be saved in the
comedi_device as the 'hw_dev'. The (*detach) of this driver can then use
to_pnp_dev() to get it back when detaching the pnp device.

In the ni_mio_cs driver, the struct pcmia_device pointer is not used so
it can simply be removed.

The NI_PRIVATE_COMMON macro can then be converted into a proper 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>
9 years agostaging: comedi: ke_counter: add ability to select counter clock source
H Hartley Sweeten [Thu, 29 May 2014 17:45:52 +0000 (10:45 -0700)]
staging: comedi: ke_counter: add ability to select counter clock source

Add an (*insn_config) to the counter subdevice to allow the user to select
the clock source for the counters using the INSN_CONFIG_SET_CLOCK_SRC
instruction. The current selection can be queried with the instruction
INSN_CONFIG_GET_CLOCK_SRC.

Also, handle the INSN_CONFIG_RESET instruction to reset all the counters.

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>
9 years agostaging: comedi: adl_pci9111: simplify A/D trigger selection code
H Hartley Sweeten [Thu, 29 May 2014 17:35:10 +0000 (10:35 -0700)]
staging: comedi: adl_pci9111: simplify A/D trigger selection code

The functions pci9111_trigger_source_set(), pci9111_pretrigger_set(),
and pci9111_autoscan_set() are all used to select the A/D trigger type.
They all do a read/mask/set/write of the A/D Trigger Mode Control register.

Simplify the code by removing these helper functions and combining all
the trigger bits so that a single write can be used to set the register.

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>
9 years agostaging: comedi: adl_pci9111: remove PCI9111_HR_DEVICE_ID define
H Hartley Sweeten [Thu, 29 May 2014 17:35:09 +0000 (10:35 -0700)]
staging: comedi: adl_pci9111: remove PCI9111_HR_DEVICE_ID define

This define is only used in the pci_device_id table and doesn't add
any additional clarity to the code. Remove the define 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>
9 years agostaging: comedi: adl_pci9111: remove PCI9111_DRIVER_NAME define
H Hartley Sweeten [Thu, 29 May 2014 17:35:08 +0000 (10:35 -0700)]
staging: comedi: adl_pci9111: remove PCI9111_DRIVER_NAME define

This define is only used in a comedi_error() message. The addition of
the driver name to the message is not necessary. Remove the define.

For aesthetics, convert the comedi_error() into a dev_dbg().

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>
9 years agostaging: comedi: pcl724: add support for Diamond Systems ONYX-MM-DIO module
H Hartley Sweeten [Thu, 29 May 2014 17:42:23 +0000 (10:42 -0700)]
staging: comedi: pcl724: add support for Diamond Systems ONYX-MM-DIO module

The Diamond Systems ONYX-MM-DIO board is a PC/104 module with two 8255
chips providing 48 digital I/O channels.

This board can be supported by the pcl724 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>
9 years agostaging: comedi: pcl730: add support for Diamond Systems IR104-PBF module
H Hartley Sweeten [Thu, 29 May 2014 17:42:22 +0000 (10:42 -0700)]
staging: comedi: pcl730: add support for Diamond Systems IR104-PBF module

The Diamond Systems IR104-PBF board is a PC/104 module with 20
optoisolated inputs and 20 relay outputs.

This board can be supported by the pcl730 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregk@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: addi_common.h: remove ADDIDATA_* defines
H Hartley Sweeten [Thu, 29 May 2014 17:30:05 +0000 (10:30 -0700)]
staging: comedi: addi_common.h: remove ADDIDATA_* defines

These defines don't add any additional clarity to the addi_data drivers.
Just 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>
9 years agostaging: comedi: addi_common.h: remove {LO, HI}WORD macros
H Hartley Sweeten [Thu, 29 May 2014 17:30:04 +0000 (10:30 -0700)]
staging: comedi: addi_common.h: remove {LO, HI}WORD macros

These macros don't add any additional clarity to the addi_data drivers.
Just 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>
9 years agostaging: comedi: addi_common.h: remove ADDIDATA_{EN, DIS}ABLE defines
H Hartley Sweeten [Thu, 29 May 2014 17:30:03 +0000 (10:30 -0700)]
staging: comedi: addi_common.h: remove ADDIDATA_{EN, DIS}ABLE defines

These defines don't add any additional clarity to the addi_data drivers.
Just 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>
9 years agostaging: comedi: addi_common.h: remove ADDI_{EN, DIS}ABLE defines
H Hartley Sweeten [Thu, 29 May 2014 17:30:02 +0000 (10:30 -0700)]
staging: comedi: addi_common.h: remove ADDI_{EN, DIS}ABLE defines

These defines don't add any additional clarity to the addi_data drivers.
They are also only used in the addi_apci_3120 driver. Just 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>
9 years agostaging: comedi: addi_common.h: remove APCI1710_SAVE_INTERRUPT define
H Hartley Sweeten [Thu, 29 May 2014 17:30:01 +0000 (10:30 -0700)]
staging: comedi: addi_common.h: remove APCI1710_SAVE_INTERRUPT define

This define 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>
9 years agostaging: comedi: addi_common.h: remove 'b_SingleDiff' from private data
H Hartley Sweeten [Thu, 29 May 2014 17:30:00 +0000 (10:30 -0700)]
staging: comedi: addi_common.h: remove 'b_SingleDiff' from private data

This member is set but never used. 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>
9 years agostaging: comedi: ni_daq_700: update driver comment
Ian Abbott [Thu, 29 May 2014 11:15:46 +0000 (12:15 +0100)]
staging: comedi: ni_daq_700: update driver comment

Reformat the comment describing this comedi driver to use the usual
block comment format.

Also remove reference to digital I/O emulating an 8255, because it
doesn't, and remove "DIO only" from the "Description:" line as it also
supports analog inputs.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adq12b: tidy up the register map defines
H Hartley Sweeten [Wed, 28 May 2014 23:34:54 +0000 (16:34 -0700)]
staging: comedi: adq12b: tidy up the register map defines

Cleanup the existing defines and add some missing bit defines.

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>
9 years agostaging: comedi: adq12b: tidy up the subdevice init
H Hartley Sweeten [Wed, 28 May 2014 23:34:53 +0000 (16:34 -0700)]
staging: comedi: adq12b: tidy up the subdevice init

For aesthetics, 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>
9 years agostaging: comedi: adq12b: remove 's->len_chanlist' init for analog inputs
H Hartley Sweeten [Wed, 28 May 2014 23:34:52 +0000 (16:34 -0700)]
staging: comedi: adq12b: remove 's->len_chanlist' init for analog inputs

This driver does not support async commands so the len_chanlist init is
unnecessary. Remove it and allow the core to default the value to '1'.

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>
9 years agostaging: comedi: adq12b: remove ADQ12B_SIZE define
H Hartley Sweeten [Wed, 28 May 2014 23:34:51 +0000 (16:34 -0700)]
staging: comedi: adq12b: remove ADQ12B_SIZE define

This define is only used in the comedi_request_region() call to
specify the I/O resource size. Remove it 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>
9 years agostaging: comedi: adq12b: remove 'differential' from private data
H Hartley Sweeten [Wed, 28 May 2014 23:34:50 +0000 (16:34 -0700)]
staging: comedi: adq12b: remove 'differential' from private data

This member of the private data is only used during the attach to
determine if there are 8 differential or 16 single-ended analog
inputs. Remove the member and use the comedi_devconfig option
directly.

Also, fix the subdev_flags when differential analog inputs 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>
9 years agostaging: comedi: adq12b: remove 'unipolar' from private data
H Hartley Sweeten [Wed, 28 May 2014 23:34:49 +0000 (16:34 -0700)]
staging: comedi: adq12b: remove 'unipolar' from private data

This member of the private data is only used during the attach to
determine which range table to use for the analog inputs. Remove
the member and use the comedi_devconfig option 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>
9 years agostaging: comedi: adq12b: tidy up adq12b_ai_rinsn()
H Hartley Sweeten [Wed, 28 May 2014 23:34:48 +0000 (16:34 -0700)]
staging: comedi: adq12b: tidy up adq12b_ai_rinsn()

For aesthetics, rename this function.

Clean up the local variables by reusing 'val' instead of using
separate variables for the:
  'status' - use once to trigger the first A/D conversion
  'hi' and 'lo' - used to read the A/D conversion result

For aesthetics, change the final return to insn->n and remove the
comment.

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>
9 years agostaging: comedi: adq12b: fix ctreg (ai channel/range) programming
H Hartley Sweeten [Wed, 28 May 2014 23:34:47 +0000 (16:34 -0700)]
staging: comedi: adq12b: fix ctreg (ai channel/range) programming

This driver only updates the ctreg (ai channel/range) register if the
desired channel or range has changed since the last analog input read
operation. It does this becuase the hardware requires an udelay to
allow the multiplexor to settle. Unfortunatly the current code never
updates the 'last_channel' and 'last_range' in the private data so
the ctreg gets updated every time.

Fix this and simplify it a bit by just storing the last ctreg value
in the private data.

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>
9 years agostaging: comedi: ni_mio_common: fix the (*insn_read) for the freq_out counter
H Hartley Sweeten [Wed, 28 May 2014 23:26:54 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: fix the (*insn_read) for the freq_out counter

The (*insn_read) functions are supposed to "read" insn->n data values and
return the number of values read.

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>
9 years agostaging: comedi: ni_mio_common: fix the (*insn_write) for the freq_out counter
H Hartley Sweeten [Wed, 28 May 2014 23:26:53 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: fix the (*insn_write) for the freq_out counter

The (*insn_write) functions are supposed to write insn->n data values and
return the number of values written. For this subdevice it only makes sense
to write the last data 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>
9 years agostaging: comedi: ni_mio_common: absorb helpers into ni_freq_out_insn_config()
H Hartley Sweeten [Wed, 28 May 2014 23:26:52 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: absorb helpers into ni_freq_out_insn_config()

Absorb the helper functions that handle the INSN_CONFIG_SET_CLOCK_SRC and
INSN_CONFIG_GET_CLOCK_SRC comedi instructions.

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>
9 years agostaging: comedi: ni_mio_common: use dev->write_subdev
H Hartley Sweeten [Wed, 28 May 2014 23:26:51 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: use dev->write_subdev

The (*attach) in ni_E_init() sets the dev->write_subdev to the analog
output subdevice. Use that instead of accessing the dev->subdevices
array 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>
9 years agostaging: comedi: ni_mio_common: use dev->read_subdev
H Hartley Sweeten [Wed, 28 May 2014 23:26:50 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: use dev->read_subdev

The (*attach) in ni_E_init() sets the dev->read_subdev to the analog
input subdevice. Use that instead of accessing the dev->subdevices
array 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>
9 years agostaging: comedi: ni_mio_common: move externally called functions to EOF
H Hartley Sweeten [Wed, 28 May 2014 23:26:49 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: move externally called functions to EOF

This source file is included by the ni_atmio, ni_mio_cs, and ni_pcmio
drivers to support the common hardware on National Instruments DAQ-STC
based boards.

The only functions actually used by the external source files are
ni_E_interrupt(), ni_alloc_private(), ni_E_init(), and mio_common_detach().
The rest of the functions in this file are only used locally.

For aesthetics, move all the externally called functions to the end of
the file.

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>
9 years agostaging: comedi: ni_mio_common: move disabled GPCT functions
H Hartley Sweeten [Wed, 28 May 2014 23:26:48 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: move disabled GPCT functions

I have not determined if the code in these functions is actually
usable. For now just move the disabled code closer to the working
gpct functions.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 24
H Hartley Sweeten [Wed, 28 May 2014 23:26:47 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 24

Move some functions to remove the need for the remaining forward declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 23
H Hartley Sweeten [Wed, 28 May 2014 23:26:46 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 23

Move ni_set_master_clock() and its helper functions to remove the need
for the forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 22
H Hartley Sweeten [Wed, 28 May 2014 23:26:45 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 22

Move ni_rtsi_insn_config() and its helper functions to remove the need
for the forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 21
H Hartley Sweeten [Wed, 28 May 2014 23:26:44 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 21

Move ni_rtsi_init() to remove the need for the forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 20
H Hartley Sweeten [Wed, 28 May 2014 23:26:43 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 20

Move ni_ai_insn_read() to remove the need for a forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 19
H Hartley Sweeten [Wed, 28 May 2014 23:26:42 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 19

Move ni_E_interrupt() to remove the need for some forward declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 18
H Hartley Sweeten [Wed, 28 May 2014 23:26:41 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 18

Move ni_ai_drain_dma() to remove the need for the forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 17
H Hartley Sweeten [Wed, 28 May 2014 23:26:40 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 17

Move the get_last_sample_*() helpers to remove the need for the forward
declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 16
H Hartley Sweeten [Wed, 28 May 2014 23:26:39 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 16

Move ni_ai_insn_config() to remove the need for a forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 15
H Hartley Sweeten [Wed, 28 May 2014 23:26:38 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 15

Move ni_ai_inttrig() to remove the need for the forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 14
H Hartley Sweeten [Wed, 28 May 2014 23:26:37 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 14

Move shutdown_ai_command() to remove the need for the forward
declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 13
H Hartley Sweeten [Wed, 28 May 2014 23:26:36 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 13

Move ni_serial_insn_config() to remove the need for some forward
declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 12
H Hartley Sweeten [Wed, 28 May 2014 23:26:35 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 12

Remove the need for the forward declaration of ni_cdio_cancel() by
indirectly calling it using the subdevice (*cancel).

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 11
H Hartley Sweeten [Wed, 28 May 2014 23:26:34 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 11

Move ni_cdio_cmd() to remove the need for the forward declaration
of ni_cdo_inttrig().

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 10
H Hartley Sweeten [Wed, 28 May 2014 23:26:33 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 10

These forward declarations are not needed.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 9
H Hartley Sweeten [Wed, 28 May 2014 23:26:32 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 9

Move ni_rtsi_insn_bits() to remove the need for the forward declaration.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 8
H Hartley Sweeten [Wed, 28 May 2014 23:26:31 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 8

Move the cs5529 calibration subdevice functions and helpers to remove
the need for the forward declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 7
H Hartley Sweeten [Wed, 28 May 2014 23:26:30 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 7

Move the programmable function inputs subdevice functions and helpers
to remove the need for the forward declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 6
H Hartley Sweeten [Wed, 28 May 2014 23:26:29 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 6

Move the ni_gpct_cmd() and ni_gpct_cancel() functions to remove the
need for the forward declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 5
H Hartley Sweeten [Wed, 28 May 2014 23:26:28 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 5

Move the calibration subdevice functions and helpers to remove the need
for the forward declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 4
H Hartley Sweeten [Wed, 28 May 2014 23:26:27 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 4

Move the caldac "packbits" callbacks to remove the need for the forward
declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 3
H Hartley Sweeten [Wed, 28 May 2014 23:26:26 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 3

Move the pwm config functions to remove the need for the forward
declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 2
H Hartley Sweeten [Wed, 28 May 2014 23:26:25 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 2

Move the eeprom read functions to remove the need for the forward
declarations.

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>
9 years agostaging: comedi: ni_mio_common: remove forward declaration 1
H Hartley Sweeten [Wed, 28 May 2014 23:26:24 +0000 (16:26 -0700)]
staging: comedi: ni_mio_common: remove forward declaration 1

Move ni_8255_callback() to remove the need for the forward declaration.

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>
9 years agostaging: bcm: Remove redundant casting in Bcmchar.c
Sachin Kamat [Thu, 29 May 2014 11:35:20 +0000 (17:05 +0530)]
staging: bcm: Remove redundant casting in Bcmchar.c

Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove redundant casting in rtw_mlme.c
Sachin Kamat [Thu, 29 May 2014 11:35:19 +0000 (17:05 +0530)]
staging: rtl8723au: Remove redundant casting in rtw_mlme.c

Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c
Sachin Kamat [Thu, 29 May 2014 11:35:18 +0000 (17:05 +0530)]
staging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c

Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: usbip: fixed a coding-style warning
Alexey Tulia [Fri, 13 Jun 2014 08:35:13 +0000 (11:35 +0300)]
staging: usbip: fixed a coding-style warning

This fixes the following warning:
- WARNING: __constant_cpu_to_le32 should be cpu_to_le32

Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Add compiler check for -Wtype-limits
Geert Uytterhoeven [Wed, 11 Jun 2014 14:57:46 +0000 (16:57 +0200)]
staging: rtl8723au: Add compiler check for -Wtype-limits

Gcc versions before 4.3 do not support -Wtype-limits:

cc1: error: unrecognized command line option "-Wtype-limits"

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_cfg80211_set_wpa_ie(): Avoid pointless memcpy
Jes Sorensen [Mon, 9 Jun 2014 13:17:08 +0000 (15:17 +0200)]
staging: rtl8723au: rtw_cfg80211_set_wpa_ie(): Avoid pointless memcpy

There is no point copying a buffer, just to scan it and then free it
again.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Move FillH2CCmd() prototype to rtl8723a_cmd.h where it really...
Jes Sorensen [Mon, 9 Jun 2014 13:17:07 +0000 (15:17 +0200)]
staging: rtl8723au: Move FillH2CCmd() prototype to rtl8723a_cmd.h where it really belongs

As an added bonus, remove the now obsolete rtw_ioctl_set.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Quiet unused variable warning when building with CONFIG_8723AU_AP...
Jes Sorensen [Mon, 9 Jun 2014 13:17:06 +0000 (15:17 +0200)]
staging: rtl8723au: Quiet unused variable warning when building with CONFIG_8723AU_AP_MODE=n

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Don't run regular scans in the driver, the stack handles that
Jes Sorensen [Mon, 9 Jun 2014 13:17:05 +0000 (15:17 +0200)]
staging: rtl8723au: Don't run regular scans in the driver, the stack handles that

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_set_802_11_bssid23a_list_scan(): Use __func__ to print functi...
Jes Sorensen [Mon, 9 Jun 2014 13:17:04 +0000 (15:17 +0200)]
staging: rtl8723au: rtw_set_802_11_bssid23a_list_scan(): Use __func__ to print function name

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Move rtw_get_cur_max_rate23a() to ioctl_cfg80211.c
Jes Sorensen [Mon, 9 Jun 2014 13:17:03 +0000 (15:17 +0200)]
staging: rtl8723au: Move rtw_get_cur_max_rate23a() to ioctl_cfg80211.c

This function has only one caller, so move it home and declare it static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_get_cur_max_rate23a(): We are in N mode if WLAN_EID_HT_CAPABI...
Jes Sorensen [Mon, 9 Jun 2014 13:17:02 +0000 (15:17 +0200)]
staging: rtl8723au: rtw_get_cur_max_rate23a(): We are in N mode if WLAN_EID_HT_CAPABILITY is present

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_get_cur_max_rate23a(): Remove duplicate fwstate checks
Jes Sorensen [Mon, 9 Jun 2014 13:17:01 +0000 (15:17 +0200)]
staging: rtl8723au: rtw_get_cur_max_rate23a(): Remove duplicate fwstate checks

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Move rtw_do_join23a() to rtw_mlme.c and declare it static
Jes Sorensen [Mon, 9 Jun 2014 13:17:00 +0000 (15:17 +0200)]
staging: rtl8723au: Move rtw_do_join23a() to rtw_mlme.c and declare it static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_do_join23a(): Don't start scanning if network isn't found
Jes Sorensen [Mon, 9 Jun 2014 13:16:59 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_do_join23a(): Don't start scanning if network isn't found

Don't start running network scans if trying to connect to a network
not in our cache. Let the 802.11 stack do it's job instead.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_set_ssid(): Use rtw_do_join_network()
Jes Sorensen [Mon, 9 Jun 2014 13:16:58 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_set_ssid(): Use rtw_do_join_network()

We already have the wlan_network we wish to join, hence it's pointless
to go back to the scanned_queue and pull it out of there, before
running the join logic.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_select_and_join_from_scanned_queue23a() never returns 2
Jes Sorensen [Mon, 9 Jun 2014 13:16:57 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_select_and_join_from_scanned_queue23a() never returns 2

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rtw_surveydone_event_callback23a(): We always set _FW_UNDER_LINKING
Jes Sorensen [Mon, 9 Jun 2014 13:16:56 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_surveydone_event_callback23a(): We always set _FW_UNDER_LINKING

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: to_join will no be true if _FW_LINKED is set
Jes Sorensen [Mon, 9 Jun 2014 13:16:55 +0000 (15:16 +0200)]
staging: rtl8723au: to_join will no be true if _FW_LINKED is set

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Remove no-op rtw_get_encrypt_decrypt_from_registrypriv23a()
Jes Sorensen [Mon, 9 Jun 2014 13:16:54 +0000 (15:16 +0200)]
staging: rtl8723au: Remove no-op rtw_get_encrypt_decrypt_from_registrypriv23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>