Commit graph

20592 commits

Author SHA1 Message Date
Ian Abbott 03c1a0b890 staging: comedi: s626: bitfield manipulation macros for CRA, CRB and setup
Some bits of the 'CRB' register have different functions when read or
written, so add macros to define the read-only parts.

Add macros to define the widths of the bitfields in the 'CRA' and 'CRB'
registers and the standard encoder setup value.

Add macros to construct and extract parts of the 'CRA' and 'CRB'
register values and the standard encoder setup value, along with a
couple of general helper macros for the above.

Redefine the bitfield mask macros for 'CRA', 'CRB' and standard encoder
setup using the above.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott e0b07b797c staging: comedi: s626: add missing bits for 'CRB' register
There are some bits in the 'CRB' register not defined in "s626.h".
Three of these are read-only bits that overlay the write-only interrupt
control bits.  Another missing bit controls whether counter 'B' is
cleared when counter 'A' overflows.  Add the missing bit definitions for
completeness.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott 9349399333 staging: comedi: s626: correct S626_CRAMSK_CLKPOL_A macro (unused)
The counter 'A' clock polarity field in the 'CRA' register is only 1 bit
wide, but the `S626_CRAMSK_CLKPOL_A` macro shows it as 2 bits wide,
which would overlap with the counter 'A' interrupt source field.  This
is harmless as the macro isn't actually used yet, but correct it anyway
as I want to use it!

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>
2013-10-19 13:47:23 -07:00
Ian Abbott 622ec01ab9 staging: comedi: s626: distinguish counter src from encoder mode
The macros `S626_CLKSRC_COUNTER`, `S626_CLKSRC_TIMER` and
`S626_CLKSRC_EXTENDER` are used logically to set the operating mode of
an encoder channel.  `S626_CLKSRC_COUNTER` (0) is also used as a 2-bit
physical value to set the counter source of an encoder channel to
"encoder".

Rename the macros to `S626_ENCMODE_COUNTER`, `S626_ENCMODE_TIMER` and
`S626_ENCMODE_EXTENDER` and rename some other macros and (unused)
functions relating to the encoder mode for consistency.

Define new macros to specify the physical counter source values for the
'CRA' register and rename the corresponding bitshift and mask macros
accordingly.  The physical values for the counter source are:

  S626_CNTSRC_ENCODER = 0      // encoder
  S626_CNTSRC_DIGIN = 1        // digital inputs
  S626_CNTSRC_SYSCLK = 2       // system clock up
  S626_CNTSRC_SYSCLK_DOWN = 3  // system clock down

Also use the `S626_CNTSRC_SYSCLK` value as a bitmask (bit 1) to indicate
either of the system clock values, with the direction (bit 0) indicated
separately in this case.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott 7293808874 staging: comedi: s626: correct a comment in s626_get_mode_b()
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>
2013-10-19 13:47:23 -07:00
Ian Abbott 2e179e428c staging: comedi: s626: specify bitshift for encoder A clock source
When setting the clock source for one of the 'A' encoders to operate in
"counter" mode in `s626_set_mode_a()`, bitshift the clock source value by
`S626_CRABIT_CLKSRC_A` for consistency with the other modes.  This has
no effect on the value since `S626_CRABIT_CLKSRC_A` is 0.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott 6c661434f9 staging: comedi: s626: clock polarity and direction are the same
When setting up an encoder channel, the setup value includes a polarity
and direction, but these are the same bit of the setup value:

  S626_CLKPOL_POS = S626_CNTDIR_UP = 0

  S626_CLKPOL_NEG = S626_CNTDIR_DOWN = 1

In the construction of the setup value, both the CLKPOL and the CNTDIR
constants are shifted by the same amount `S626_BF_CLKPOL`.  Only the
following combinations are set up currently (this may change if user
configuration of the encoder is implemented properly):

  (S626_CLKPOL_POS << S626_BF_CLKPOL)

  (S626_CLKPOL_POS << S626_BF_CLKPOL) |
  (S626_CNTDIR_UP << S626_BF_CLKPOL)

  (S626_CLKPOL_POS << S626_BF_CLKPOL) |
  (S626_CNTDIR_DOWN << S626_BF_CLKPOL)

The first two are used in "counter" mode and is equivalent to:

  (S626_CLKPOL_POS << S626_BF_CLKPOL)

The last one is used in "timer" mode and is equivalent to:

  (S626_CNTDIR_DOWN << S626_BF_CLKPOL)

Use the shorter equivalents.  The comments in "s626.h" indicate that the
'CLKPOL' constants make more sense for the "counter" mode (when the
encoders operate as up/down counters) and the 'CNTDIR' constants make
more sense for the "timer" mode.

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>
2013-10-19 13:47:23 -07:00
Ian Abbott f8d939e411 staging: comedi: rtd520: use normal bitfield functions
The `unsigned char chan_is_bipolar[]` member of `struct rtd_private` is
used with some macros as a packed array of 1-bit values that indicate
whether the corresponding entries in the hardware's "channel-gain" table
have been set to a bipolar (1) or unipolar (0) range, as the raw samples
from the hardware need to be cooked differently in each case.

Replace the declaration of the member with a standard Linux bitfield
using `DECLARE_BITFIELD()`, and replace the home-grown macros used
access the bitfield with the standard Linux non-atomic bitop functions,
`__set_bit()`, `__clear_bit()` and `test_bit()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:45:54 -07:00
Aldo Iljazi 0735e83c78 Staging: ft1000: fixed two coding style issues
Fixed two coding style issues, specifically:

ft1000_proc.c:35: ERROR: space required before the open parenthesis '('
ft1000_proc.c:42: ERROR: space required before the open parenthesis '('

Signed-off-by: Aldo Iljazi <me@aldo.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:43:41 -07:00
Eli Billauer 35fcf7e3c0 staging: xillybus: Use dev_* functions instead of pr_* in xillybus_core
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Eli Billauer 1a2f9a9ea5 staging: xillybus: Use dev_* functions instead of pr_* in xillybus_of
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Eli Billauer 2cb85c0845 staging: xillybus: Use dev_* functions instead of pr_* in xillybus_pcie
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Eli Billauer 26a6fc93fc staging: xillybus: Remember device pointer for use with dev_* functions
This is necessary so that xillybus_core uses the correct device pointer
for PCIe devices in diagnostic message calls (dev_err, dev_warn and dev_info)

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:41:34 -07:00
Lisa Nguyen 5f45aa1668 staging/lustre/lnet: Remove unnecessary spaces in router_proc.c
Remove unnecessary spaces between function names and open
parentheses in router_proc.c to meet kernel coding style.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:38:14 -07:00
Lisa Nguyen 28ad960e7a staging/lustre/lnet: Fix static initialization error in router_proc.c
Fixed the static initialization error generated by checkpatch.pl to
meet kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:38:14 -07:00
Lisa Nguyen 51f01fabe9 staging/lustre/lnet: Reformat pointer variable in lib-move.c
Reformat a pointer variable in lib-move.c to meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen 2b5f2e44a0 staging/lustre/lnet: Remove () from return statements in lib-move.c
Remove unnecessary parentheses from return statements to
eliminate errors generated by checkpatch.pl and meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen ae4003f056 staging/lustre/lnet: Adjust lines to meet 80 column limit in lib-move.c
Fixed lines to not exceed more than 80 columns per line to meet
kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen 9b79ca855e staging/lustre/lnet: Move open braces to previous lines in lib-move.c
Move open braces to previous lines in lib-move.c to meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:36:40 -07:00
Lisa Nguyen af66a6e29c staging/lustre/lnet: Remove unnecessary whitespace in lib-move.c
Remove unnecessary whitespace around open parentheses in lib-move.c
to meet kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:35:27 -07:00
Lisa Nguyen 5f849bb0e4 staging/lustre/lnet/selftest: Remove unnecessary spaces in brw_test.c
Remove spaces between function names and open parentheses to
eliminate warnings generated by checkpatch.pl and meet kernel
coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:35:27 -07:00
Lisa Nguyen 5252bbfde5 staging/lustre/lnet/selftest: Fix trailing statements in brw_test.c
Fix trailing statement errors generated by checkpatch.pl in
brw_test.c to meet kernel coding standards.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 13:35:27 -07:00
Teodora Baluta 5e1e704a7d staging: rtl8192u: fix sparse warning, make a function static
Fix the following sparse warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:240:22: warning: symbol 'ieee80211_alloc_txb' was not declared. Should it be static?

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:27:49 -07:00
Ashvini Varatharaj c45a9a9bf3 Staging: speakup: removing jiffies comparison in speakup_apollo.c
Fix checkpatch warning: WARNING: Comparing jiffies is almost always
wrong; prefer time_after, time_before and friends

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:27:19 -07:00
Ashvini Varatharaj 75b76b470f Staging: speakup: removing jiffies comparison using time_after_eq()
Fix checkpatch warning:  Comparing jiffies is almost always wrong;
prefer time_after, time_before and friends

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 05:27:15 -07:00
Greg Kroah-Hartman 2ef9d838e4 Fourth round of IIO new drivers, functionality and cleanups for the 3.13 cycle.
New Drivers
 * cm36651 combined RGB light and proximity sensor.
 
 Core improvements
 
 * Some more fixes and cleanups related to buffers.  These include the second
   half of a series which went is as fixes.  The basis for delaying until the
   next merge window is that some are too invasive for this late in a cycle
   and others only effect code paths current unused in the mainline tree.
   In this case we have:
    * protecting against concurrent userspace access
    * fixing a memory leak if a device goes away
    * avoiding always reallocating the buffer whether or not it has changed
      (a bug fix, but one with no functional changes other than a small speed
      improvement.)
    * Add reference counting for buffers to ensure they hang around if open
      from userspace or in kernel when the device is forcefully removed.
    * Return -ENODEV for buffer access operations when the device has gone
      away.
    * Add proper locking for iio_update_buffers (currently we only have one
      buffer per device in mainline, but an input bridge driver is under
      development which would make this bug 'real'.)
    * Wake up anyone waiting on a buffer if the device is unregistered.  A
      subsequent read will fail, notifying userspace that the device is no
      longer there rather than having it wait possibly for ever.
 
 * Move the iio_sw_preenable functionality into the core.  This avoids drivers
   having to 'know' about how the buffers are implemented and is called by
   almost all drivers anyway.  Those that don't call it are not harmed by it
   being called.
 * New registration approach for information (i.e. sysfs attributes) about
   events.  Much more generic and now similar to how the equivalent is
   handled for channel information.  The events infrastructure had been left
   behind by other changes so this brings it back in line.
 * Using the new events registration approach, add a hysterisis event_info
   element and apply this to those drivers with this property.
 * A little unitialized variable bug in the generic_buffer.c example.
 * Factor out the code for freeing lists of IIO Device attributes to avoid
   some repitition.
 
 Driver cleanups
 * At91 driver gains touch screen support and some related fixes.
 * Follow up series of patches removing the now redundant
   iio_sw_buffer_preenable calls.
 * Lots of conversions to the new event registration methods.
 * Another round of hmc5843 cleanups as that driver moves towards graduating
   from staging.
 * Make some SoC drivers buildable if COMPILE_TEST is used.  Follow up fixes
   for a few bits and bobs that revealed.
 * Add explicit includes of linux/of.h to those drivers making us of linux/of.h
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSYmsbAAoJEFSFNJnE9BaIuvsQAIxknxxAVBl8Jj8sqFJM/TJh
 /iBP4c7HPsiZUFAyt59PONvwaY2iacTjWYx55mPsHpLXtVG4nsTj/E21lSPsp90D
 YuXLmT8vU4kN3X1wJkiUmBYzO6mqHlBw8Z+dcLB4N4xOpHgvFTSuc12Gdmilbna2
 APjAm513G6MiSEyG/RpNsKXGHFZBOCnvjs4hTQKg9QEzLvoqBZ/e3vUAsswMFLvP
 eTTMRvgfNz2TSeOR1F5tNrMTnilAuBUZ8sCUw4HwtNN2KAnUNKtuGD174U00z7pH
 qKCfZffm34Vb7niEZsVn2MhvbXwdUgWmEF1yqwApXTfnXsDTqWLakhMUHExIMozo
 8jIewD30v6Daj+biPGxnmikRl9XfzgCN5nO11lx68rwur4q2KMYvSRdMVecipa6U
 grSgXebFoQgdnj+2CN/0Z0pMqHeXpgMYzpG04o30/SjXgF4KRD6nDLZamJwwVHDj
 Iivn5EyJeOt83BKSAtHm6tRqIbZ1abVwHoztxPDgl0nnuEtRv4VMGECOtLlGkHkx
 lV2DdLd4UyahF3gPp6xvbnmhk6yWH4xMN0zwImSI4Lt7+ncRoZ6dy2i3HxrHNyu6
 8zMKdZQDnMMoxcdqSxy5nXezf/x6e2MVReQiWLbSzpD1WU6OD0BrfGMe+3sFXSde
 lsFgkAigdJ58t2vZ+gwb
 =TXhl
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.12d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Fourth round of IIO new drivers, functionality and cleanups for the 3.13 cycle.

New Drivers
* cm36651 combined RGB light and proximity sensor.

Core improvements

* Some more fixes and cleanups related to buffers.  These include the second
  half of a series which went is as fixes.  The basis for delaying until the
  next merge window is that some are too invasive for this late in a cycle
  and others only effect code paths current unused in the mainline tree.
  In this case we have:
   * protecting against concurrent userspace access
   * fixing a memory leak if a device goes away
   * avoiding always reallocating the buffer whether or not it has changed
     (a bug fix, but one with no functional changes other than a small speed
     improvement.)
   * Add reference counting for buffers to ensure they hang around if open
     from userspace or in kernel when the device is forcefully removed.
   * Return -ENODEV for buffer access operations when the device has gone
     away.
   * Add proper locking for iio_update_buffers (currently we only have one
     buffer per device in mainline, but an input bridge driver is under
     development which would make this bug 'real'.)
   * Wake up anyone waiting on a buffer if the device is unregistered.  A
     subsequent read will fail, notifying userspace that the device is no
     longer there rather than having it wait possibly for ever.

* Move the iio_sw_preenable functionality into the core.  This avoids drivers
  having to 'know' about how the buffers are implemented and is called by
  almost all drivers anyway.  Those that don't call it are not harmed by it
  being called.
* New registration approach for information (i.e. sysfs attributes) about
  events.  Much more generic and now similar to how the equivalent is
  handled for channel information.  The events infrastructure had been left
  behind by other changes so this brings it back in line.
* Using the new events registration approach, add a hysterisis event_info
  element and apply this to those drivers with this property.
* A little unitialized variable bug in the generic_buffer.c example.
* Factor out the code for freeing lists of IIO Device attributes to avoid
  some repitition.

Driver cleanups
* At91 driver gains touch screen support and some related fixes.
* Follow up series of patches removing the now redundant
  iio_sw_buffer_preenable calls.
* Lots of conversions to the new event registration methods.
* Another round of hmc5843 cleanups as that driver moves towards graduating
  from staging.
* Make some SoC drivers buildable if COMPILE_TEST is used.  Follow up fixes
  for a few bits and bobs that revealed.
* Add explicit includes of linux/of.h to those drivers making us of linux/of.h
2013-10-19 05:16:34 -07:00
Peter Meerwald 094509b1d1 staging:iio:hmc5843: Trivial cleanup
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:52:51 +01:00
Peter Meerwald 9d5ad0c3e7 staging:iio:hmc5843: Check initialization and chip identifier
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:52:16 +01:00
Peter Meerwald f3f755197b staging:iio:hmc5843: Introduce _set_range_gain()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:48 +01:00
Peter Meerwald ca4c6172cd staging:iio:hmc5843: Rename _set_rate() to _set_samp_freq()
move locking inside _set() function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:27 +01:00
Peter Meerwald 4f1ca4158d staging:iio:hmc5843: Reorganize _set_meas_conf()
move locking inside _set() function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:07 +01:00
Peter Meerwald 62248758a7 staging:iio:hmc5843: Rename _configure() to _set_mode()
and be consistent with other setter functions in that first argument
is hmc5843_data

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:50:41 +01:00
Peter Meerwald 7183de9450 staging:iio:hmc5843: Remove ability to change operating mode
only continuous mode is supported for now; the driver could/should
be switched to single conversion mode

operating mode should be determined by the way IIO accesses the device
and not exposed explicitly

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:50:10 +01:00
Peter Meerwald cb9b9a828f staging:iio:hmc5843: Add trigger handling
v3:
* use __be16 instead of s16
v2 (thanks to Jonathan Cameron):
* drop dynamic buffer allocation, buffer is in hmc5842_data
* grab timestamp near data acquisition
* restrict available scan masks (only read all axis)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:47:55 +01:00
Peter Meerwald 39c1882882 staging:iio:hmc5843: Always read all channels values otherwise no updates
v2:
* use __be16 instead of s16

Split out data ready/wait for read measurement
fix bug in case reading status register fails

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:46:43 +01:00
Peter Meerwald 9a3b2d5e0c staging:iio:hmc5843: Rename _check_samp_freq to get_samp_freq_index
and drop/inline helper functions _check_int_plus_micros() and
_show_int_plus_micros()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:45:41 +01:00
Peter Meerwald ae6f54d2b1 staging:iio:hmc5843: Use SCALE instead of magn_range
v3:
* rename _check_scale() to _get_scale_index()
v2:
* use SCALE instead of CALIBSCALE to control the range/gain
  of measurements

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:45:09 +01:00
Lars-Peter Clausen a47f6e08ed staging:iio:spear_adc: Fix IRQ check
The test in the spear_adc driver which checks whether the IRQ number returned
by platform_get_irq() has multiple problems. It accepts 0 even though this is
an invalid IRQ. It also rejects IRQ numbers that are larger or equal than
NR_IRQS. First of all drivers should never need to reference NR_IRQS and
secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check
might reject valid IRQ numbers. This patch modifies the check to only test
against less or equal to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:14:00 +01:00
Lars-Peter Clausen 2918ad14cc staging:iio:lpc32xx_adc: Fix IRQ check
The test in the lpc32xx_adc driver which checks whether the IRQ number returned
by platform_get_irq() has multiple problems. It accepts 0 even though this is an
invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS.
First of all drivers should never need to reference NR_IRQS and secondly with
CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject
valid IRQ numbers. This patch modifies the check to only test against less or
equal to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:11:45 +01:00
Nandini Hanumanthagowda 1c3e56f99c staging: vt6656: removed line over 80 chars warning
Removed the checkpatch warning of line over 80 chars
by breaking the long line into sensible chunks of 2 lines
to comply with coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda efbe51829f staging: vt6656: removed C99-style comments
Linux style for comment is C89 style "/* */" and it
doesn't prefer C99-style comment "//...". Hence replaced
C99-style comments used in code by C89 style comment to
comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda 5a69f36db3 staging: vt6656: removed unnecessary parentheses in return statement
There was parentheses around return statement's value which
was not required since return statement is not a function.
Hence removed the parentheses to eliminate the checkpatch error
which states:
	ERROR: return is not a function, parentheses are not required

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda fc044ac39c staging: vt6656: removal of braces under if-control statement
Removed braces under if-else control flow statement whenever
there is only one statement under if-else control statement
to comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda 1266ed7633 staging: vt6656: indentation and removal of unnecessary spaces
Removed unnecessary white spaces at beginning of line
and added proper indentation to fix checkpatch warnings/errors
to improve the readability of code

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:16 -07:00
Archana kumari f1f9f35019 staging: vt6655:removed incorrect casting in hostap.c
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:32:35 -07:00
Ashvini Varatharaj 8cedb1be2f Staging: sb105x: Removing trailing whitespaces
Fix checkpatch error : ERROR: trailing whitespace

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Ashvini Varatharaj 40e4205ad6 Staging: wlan-ng: changing "* dev" to "*dev"
Fix checkpatch error: ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Archana kumari 3d47910be4 staging: dgnc: braces {} are not necessary for single statement in dgnc_cls.c
Fix checkpatch.pl issues with braces {} are not necessary
for single statement blocks in dgnc_cls.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:11:08 -07:00
Archana kumari 8009ae1a08 staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the Sparse Warning "symbol was not declared. Should it be
static?" in aes_ccmp.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:09:36 -07:00
Rashika Kheria d79a441151 Staging: lustre: Removal of Space between function name and parenthesis in timer.c
The patch fixes the following checkpatch.pl warning in timer.c-
WARNING: space prohibited between function name and open parenthesis '(

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria b0834c8728 Staging: lustre: Removal of assignment in if condition in conrpc.c
This patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: do not use assignment in if condition

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria eac2e8c6f5 Staging: lustre: Fix quoted string split across lines in conrpc.c
This patch fixes the following checkpatch.pl warning in conrpc.c-
WARNING: quoted string split across lines conrpc.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria fc831a9049 Staging: lustre: Fix Space Prohibition before '++' in conrpc.c
This patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: space prohibited before that '++'

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rashika Kheria 98d1bbddc6 Staging: lustre: Fix Space Requirement around ':' in conrpc.c
The patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: spaces required around that ':'

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rashika Kheria 4d72b5afc0 Staging: lustre: Removal of Space between function name and parenthesis in conrpc.c
The patch fixes the following checkpatch.pl warning in conrpc.c-
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Krzysztof Hałasa cfd736adf6 [media] SOLO6x10: Fix video frame type (I/P/B)
Mask v4l2_buf.flags to indicate only I/P/B frames.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 05:50:00 -03:00
Teodora Baluta f149080984 Staging: rtl8192u: use gfp_t instead of int
This patch fixes the following type of sparse warnings:

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    expected restricted gfp_t [usertype] flags
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    got int [signed] gfp_mask

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:53:42 -07:00
Teodora Baluta a115ee4175 Staging: rtl8192u: fix functions that should not be declared extern
These functions are already marked extern in the header file

drivers/staging/rtl8192u/r819xU_phy.c:1716:13: warning: function 'InitialGainOperateWorkItemCallBack' with external linkage has definition
drivers/staging/rtl8192u/r819xU_cmdpkt.c:497:12: warning: function 'cmpk_message_handle_rx' with external linkage has definition

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:51:26 -07:00
Rashika Kheria 1d612bd477 Staging: vt6655: Removal of Unused Function
This patch removes unused function 'RFbShutDown' from file rf.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:49:19 -07:00
Rashika Kheria 5da5804b9c Staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the following Sparse Warnings in rf.c:

drivers/staging/vt6655/rf.c:58:21: warning: symbol 'dwAL2230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:76:21: warning: symbol 'dwAL2230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:93:21: warning: symbol 'dwAL2230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:110:15: warning: symbol 'dwAL2230PowerTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:180:21: warning: symbol 'dwAL7230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:203:21: warning: symbol 'dwAL7230InitTableAMode' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:222:21: warning: symbol 'dwAL7230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:288:21: warning: symbol 'dwAL7230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:352:21: warning: symbol 'dwAL7230ChannelTable2' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:431:6: warning: symbol 's_bAL7230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:474:6: warning: symbol 's_bAL7230SelectChannel' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:634:6: warning: symbol 'RFbAL2230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:681:6: warning: symbol 'RFbAL2230SelectChannel' was not declared. Should it be static?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:47:29 -07:00
Ian Abbott f1d376beae staging: comedi: usbduxsigma: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently for handling comedi sample data and also
for the USB data buffers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott 470180c611 staging: comedi: usbdux: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently for handling comedi sample data and also
for the USB data buffers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott 5fd4b711be staging: comedi: s626: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently in the "s626" module when dealing with
sample values.

Rewrite `s626_reg_to_uint()` as it can be done with a one-liner.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott 055a1e2c56 staging: comedi: rtd520: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types for sample value manipulations in the "rtd520" driver
for consistency.

Also replace the hand-coded munging of 2's complement sample values with
calls to `comedi_offset_munge()` and AND with `s->maxdata` to strip off
any extra sign bits.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 8bab0d680e staging: comedi: quatech_daqp_cs: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `daqp_interrupt()` to use unsigned sample values for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 5c174c41d8 staging: comedi: pcmuio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `pcmuio_handle_intr_subdev()` in the "pcmuio" module to use
unsigned sample values for consistency.

Also, make the order in which `pcmuio_handle_intr_subdev()` writes the
two sample values (each actually containing up to 16 1-bit sample
values) independent of the host byte ordering.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott f23b65a588 staging: comedi: pcmmio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `interrupt_pcmmio()` and `ai_rinsn()` in the "pcmmio" module to
use unsigned sample values for consistency.

Also, make the order in which `interrupt_pcmmio()` writes the two sample
values (each actually containing up to 16 1-bit sample values)
independent of the host byte ordering.

Note that this module is a mess, so please excuse the checkpatch
warnings.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 4bf59ce248 staging: comedi: pcl818: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the interrupt data transfer functions in the "pcl818" module to
use unsigned types for consistency.

Also remove the `short *ai_data` member of `struct pcl818_private` as it
is only assigned to and otherwise unused.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 54d2dd8443 staging: comedi: pcl816: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the "pcl816" module to use unsigned types to handle samples for
consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 8017c51305 staging: comedi: pcl812: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `transfer_from_dma_buf()` and `interrupt_pcl812_ai_dma()` in the
"pcl812" module to use `unsigned short` sample values for consistency.

Also remove the `short *ai_data` member of `struct pcl812_private` as it
is only assigned to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott b12bb4a5f3 staging: comedi: pcl711: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Don't cast the sample value parameter of `comedi_buf_put()` to `short`,
particularly as it has now been changed to `unsigned short`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott 319b67ae1c staging: comedi: ni_pcidio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `nidio_interrupt()` to use unsigned types for sample values
(actually bit-vectors of 1-bit sample values) instead of signed types.

Also rename the `AuxData` variable to `auxdata` and change it from
`long` to `unsigned int` as it only needs to hold a 32-bit value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott 3a2b101cc5 staging: comedi: ni_mio_common: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_fifo_buffer[]` element of `struct
ni_board_struct` and the types of various local variables from `short`
to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott c0edd2c627 staging: comedi: ni_labpc: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `labpc_ai_cmd()` from `short`
to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott 2fb5cd385c staging: comedi: ni_at_a2150: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the type of the `dma_buffer` member of `struct a2150_private`
from `s16 *` to `uint16_t *`, and change the type of the `dpnt` variable
in `a2150_interrupt()` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott ac2832f859 staging: comedi: me4000: sample types are unsigned (and not long!)
Sample values in comedi are generally represented as unsigned values.
Change the types of various variables in the "me4000" driver dealing
with samples to use unsigned types for consistency.

Also replace the `long` or `unsigned long` variables used to handle
32-bit register values to `unsigned int`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott 22d1b0650a staging: comedi: icp_multi: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
icp_multi_private` from `short` to `unsigned short` for consistency.

Also remove the `ai_data` and `di_data` members as they are not used.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott 58f91823de staging: comedi: fl512: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_readback[]` member of `struct
fl512_private` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott 37a96e994c staging: comedi: dt3000: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `dt3k_ai_empty_fifo()` from
`short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:23 -07:00
Ian Abbott 766b1f95cf staging: comedi: dt282x: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change various members of `struct dt282x_private` and various parameters
and variables dealing with samples to use `unsigned short` instead of
`short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott 65a62aaec2 staging: comedi: das1800: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the type of the `ao_update_bits` member of `struct
das1800_private` and the types of various local variables used to hold
sample values from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott eabbf3f43f staging: comedi: das16m1: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_buffer[]` member of `struct
das16m1_private_struct` and the types used by `munge_sample()` and
`munge_sample_array()` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott 920983458c staging: comedi: das16: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `das16_ai_munge()` from `short
*` to `unsigned short *` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 0522063806 staging: comedi: cb_pcidas64: sample types are unsigned
Sample values in comedi are unsigned.  Change the element type of
`ao_bounce_buffer[]` in `struct pcidas64_private` from `short` to
`unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 79e3b11987 staging: comedi: cb_pcidas: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the element types of `ai_buffer[]`, `ao_buffer[]` and
`ao_value[]` in `struct cb_pcidas_private` to `unsigned short` for
consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 863e52769d staging: comedi: amplc_pci230: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Replace all uses of `short` to handle sample values in the
"amplc_pci230" driver with `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott b6b40b67a9 staging: comedi: amplc_pci224: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `ao_scan_vals` member of `struct pci224_private`
from `short *` to `unsigned short *` for consistency.  Also change the
type of the `array` variable in `pci224_ao_munge()` from `short *` to
`unsigned short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 6916308938 staging: comedi: adv_pci1723: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1723_private` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott e3a9e513c6 staging: comedi: adv_pci1710: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1710_private` from `short` to `unsigned short` for consistency.  Also
remove the `ai_data` member as it is only assigned to.  Change various
local variables used to hold sample values to `unsigned short`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott 6cda0d26b1 staging: comedi: adl_pci9118: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the `ao_data[]` and `dmabuf_virt[]` members of `struct
pci9118_private` and various local variables dealing with sample values
to use `unsigned short` instead of `short` for consistency.

Also remove the `short *ai_data` member of `struct pci9118_private` as
it is only assigned to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott b909ba8f8b staging: comedi: adl_pci9111: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_bounce_buffer[]` member of `struct
pci9111_private_data` from `short` to `unsigned short` for consistency.
Also change the type of the `array` variable in `pci9111_ai_munge()`
from `short *` to `unsigned short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott 58a37d4186 staging: comedi: addi_apci_3120: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of `ul_DmaBufferVirtual[2]` in `struct
addi_private` from `short *` to `unsigned short *` for consistency.
Note that several ADDI-DATA drivers use this struct from
"addi_common.h", but only the "addi_apci_3120" driver uses this member.
Also change the type of the `dma_buffer` parameter of
`v_APCI3120_InterruptDmaMoveBlock16bit()` from `short *` to `unsigned
short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott 830e273c0e staging: comedi: 8255: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
`subdev_8255_interrupt()` calls `comedi_buf_put()` with a `short` data
value merely because that's what was previously expected.  Since it now
expects an `unsigned short`, change it here for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott ca05b81334 staging: comedi: use unsigned sample in cfc_write_to_buffer()
Sample values in comedi are generally represented as unsigned values.
`cfc_write_to_buffer()` in "comedi_fc.h" currently uses `short` to hold
a 16-bit sample value to be written to the buffer.  Change the type of
the parameter to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:16 -07:00
Ian Abbott 0a6fd02c1c staging: comedi: use unsigned samples for comedi_buf_put()/get()
Sample values in comedi are generally represented as unsigned values.
`comedi_buf_put()` and `comedi_buf_get()` use a `short` to hold the
16-bit data value being transferred to or from the comedi buffer.
Change them to use `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:16 -07:00
Malcolm Priestley 3ba0938c16 staging: vt6656: rxtx.c s_vFillTxKey replace u8 *pbyBuf.
Replace with struct vnt_tx_fifo_head and attach pbyBuf to
adwTxKey[0]

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:45:50 -07:00
Malcolm Priestley ecd80240af staging: vt6656: rxtx.c clean up s_uGetRTSCTSDuration
White space clean up.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley 3dec8f1654 staging: vt6656: rxtx.c s_uGetRTSCTSDuration allow fall-through duplicates
Allow switch fall-through of duplicate case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley f84cdf65a7 staging: vt6656: rxtx.c s_bPacketToWirelessUsb set fallback tx rates
Set the two TX fall back rates in s_bPacketToWirelessUsb and
pass to private area of driver in variables tx_rate_fb0
and tx_rate_fb1 from the wFB_Opt0/wFB_Opt1 array.

Apply these rates were needed in the TX structure and
remove byFBOption settings in s_uGetRTSCTSDuration.

This greatly simplifies s_uGetRTSCTSDuration and
more future flexibility of setting rates from
upper levels of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:36 -07:00
Lars-Peter Clausen 889a62ba6d staging:iio:ade7758: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:16:15 +01:00
Lars-Peter Clausen 75b19bbf22 staging:iio:ad5933: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:16:15 +01:00
Lars-Peter Clausen 29da147245 staging:iio:simple-dummy: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:15:40 +01:00
Lars-Peter Clausen 7197812187 staging:iio:mxs-lradc: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:57 +01:00
Lars-Peter Clausen 77e587f676 staging:iio:lis3l02dq: Remove redundant call to iio_sw_buffer_preenable().
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:57 +01:00
Archana kumari 4a75ffa8ad staging:dgnc:Fixes use of deprecated headers in dgnc_cls.c
Fixes use of deprecated header <asm/io.h> in staging:dgnc:dgnc_cls.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:42:42 -07:00
Teodora Baluta 57a8852912 Staging: rtl8192u: fix checkpatch.pl error
This patch fixes the checkpatch.pl script error:
ERROR: do not use C99 // comments
+static long ieee80211_translate_todbm(u8 signal_strength_index)// 0-100
index.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:40:30 -07:00
Teodora Baluta 46326d2622 Staging: rtl8192u: fix sparse warnings for static functions
Fix sparse warnings in static function in driver rtl8192u

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:39:32 -07:00
Kelley Nielsen 4b31e1f8ff staging: ft1000: change scram_dnldr() header to one line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:13 -07:00
Kelley Nielsen 456ae7ebfd staging: ft1000: change write_block_fifo() header to /* */ style in ft1000_download.c
As per coding style, C99 comments are not allowed
removed some redundant information and empty space
Left the parameter descriptions because the
parameter list is long and cryptic looking

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen 69f7be1fba staging: ft1000: change write_blk header to /* */ style in ft1000_download.c
As per coding style, C99 comments are not allowed
removed some redundant information and empty space
Left the parameter descriptions because the
parameter list is long and cryptic looking

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen b30f4e234f staging: ft1000: change hdr_checksum() header to one line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen 9e80d03c75 staging: ft1000: change put_request_value() header to single line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Rashika Kheria 7ed57bca58 Staging: btmtk_usb: Fix Sparse Warning of incorrect type in assignment
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:676:39: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    expected unsigned int [unsigned] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    got restricted __le32 [usertype] <noident>

drivers/staging/btmtk_usb/btmtk_usb.c:736:31: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    expected unsigned int [unsigned] [addressable] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    got restricted __le32 [usertype] <noident>

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:32:28 -07:00
Nandini Hanumanthagowda c744fd5fa8 staging: vt6656: Removed checkpatch whitespace errors
Removed whitespace related errors and warnings by removing
unnecessary spaces before new line in the quoted string
and spaces at start of any line or before tab to comply
with the coding style.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:26:20 -07:00
Nandini Hanumanthagowda a96f5ba6f9 staging: vt6656: removed space related checkpatch warnings
Removed spaces around operators where it was not required
as per coding style
Added spaces around operators where it was necessary as
per coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:26:20 -07:00
Linus Walleij 263c43a447 Linux 3.12-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJSUc9zAAoJEHm+PkMAQRiG9DMH/AtpuAF6LlMRPjrCeuJQ1pyh
 T0IUO+CsLKO6qtM5IyweP8V6zaasNjIuW1+B6IwVIl8aOrM+M7CwRiKvpey26ldM
 I8G2ron7hqSOSQqSQs20jN2yGAqQGpYIbTmpdGLAjQ350NNNvEKthbP5SZR5PAmE
 UuIx5OGEkaOyZXvCZJXU9AZkCxbihlMSt2zFVxybq2pwnGezRUYgCigE81aeyE0I
 QLwzzMVdkCxtZEpkdJMpLILAz22jN4RoVDbXRa2XC7dA9I2PEEXI9CcLzqCsx2Ii
 8eYS+no2K5N2rrpER7JFUB2B/2X8FaVDE+aJBCkfbtwaYTV9UYLq3a/sKVpo1Cs=
 =xSFJ
 -----END PGP SIGNATURE-----

Merge tag 'v3.12-rc4' into devel

Linux 3.12-rc4
2013-10-16 10:05:53 +02:00
Archana kumari 2db0083d90 staging:netlogic:Fixes commenting style in xlr_net.c
Fixes commenting style in xlr_net.c mentioned in
drivers:staging:netlogic:TODO file

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:27:11 -07:00
Randy Dunlap d6ae99d04e staging/olpc_dcon: fix kconfig to fix build errors
Fix build errors when GPIO_CS5535=m and FB_OLPC_DCON=y
by preventing that kconfig combination.

These build errors are caused by having a kconfig bool symbol
(FB_OLPC_DCON_1) that depend on a tristate symbol (GPIO_CS5535),
but when the tristate symbol is =m, the bool symbol is =y.

  drivers/built-in.o: In function `dcon_read_status_xo_1':
  olpc_dcon_xo_1.c:(.text+0x359531): undefined reference to `cs5535_gpio_set'
  drivers/built-in.o: In function `dcon_wiggle_xo_1':
  olpc_dcon_xo_1.c:(.text+0x35959f): undefined reference to `cs5535_gpio_set'
  olpc_dcon_xo_1.c:(.text+0x359610): undefined reference to `cs5535_gpio_clear'
  drivers/built-in.o:olpc_dcon_xo_1.c:(.text+0x3596a1): more undefined references to `cs5535_gpio_clear' follow
  drivers/built-in.o: In function `dcon_wiggle_xo_1':
  olpc_dcon_xo_1.c:(.text+0x359708): undefined reference to `cs5535_gpio_set'
  drivers/built-in.o: In function `dcon_init_xo_1':
  olpc_dcon_xo_1.c:(.text+0x35989b): undefined reference to `cs5535_gpio_clear'
  olpc_dcon_xo_1.c:(.text+0x3598b5): undefined reference to `cs5535_gpio_isset'
  olpc_dcon_xo_1.c:(.text+0x359963): undefined reference to `cs5535_gpio_setup_event'
  olpc_dcon_xo_1.c:(.text+0x359980): undefined reference to `cs5535_gpio_set_irq'
  olpc_dcon_xo_1.c:(.text+0x359a36): undefined reference to `cs5535_gpio_set'

However, adding GPIO_CS5535 to the Kconfig dependencies also creates
a kconfig recursive dependency error on powerpc:
  drivers/i2c/Kconfig:5:error: recursive dependency detected!
  drivers/i2c/Kconfig:5:	symbol I2C is selected by FB_OLPC_DCON
  drivers/staging/olpc_dcon/Kconfig:1:	symbol FB_OLPC_DCON depends on GPIO_CS5535
  drivers/gpio/Kconfig:577:	symbol GPIO_CS5535 depends on GPIOLIB
  drivers/gpio/Kconfig:38:	symbol GPIOLIB is selected by ARCH_REQUIRE_GPIOLIB
  drivers/gpio/Kconfig:23:	symbol ARCH_REQUIRE_GPIOLIB is selected by MCU_MPC8349EMITX
  arch/powerpc/platforms/Kconfig:351:	symbol MCU_MPC8349EMITX depends on I2C

This is due to FB_OLPC_DCON selecting I2C instead of depending on it,
so change the select to a dependency.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Daniel Drake <dsd@laptop.org>
Cc:	Jens Frederich <jfrederich@gmail.com>
Cc:	Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:25:30 -07:00
Greg Kroah-Hartman fcd70b4b08 Revert "staging/olpc: fix dependencies to fix build errors"
This reverts commit 6170155d4a.

It isn't correct.

Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Daniel Drake <dsd@laptop.org>
Cc: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:22:15 -07:00
Randy Dunlap 3685ebc4bd staging/mt29f_spinand: fix build error when ONDIEECC not enabled
Fix build error when CONFIG_MTD_SPINAND_ONDIEECC is not enabled
by moving an inline function outside of that #ifdef block.

drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_byte':
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:9: error: implicit declaration of function 'mtd_to_state' [-Werror=implicit-function-declaration]
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_write_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:700:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:707:32: warning: initialization makes pointer from integer without a cast [enabled by default]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Kamlakant Patel <kamlakant.patel@broadcom.com>
Cc: Mona Anonuevo <manonuevo@micron.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:19:48 -07:00
Malcolm Priestley e1feda132f staging: vt6656: return if pControlURB->hcpriv not NULL
Fixes occasional urb submitted while active.

Even thought the fMP_CONTROL_WRITES/fMP_CONTROL_READS flags
are cleared in the return context urb->hcpriv is not NULL.

check for hcpriv and return STATUS_FAILURE if not NULL.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:13 -07:00
Malcolm Priestley 60cc27472c staging: vt6656: Remove 10 second timer and move to BSSvSecondCallBack
Remove sTimerTxData 10 second timer which triggers PSbSendNullPacket
every 40 seconds when bLinkPass == true.

Move the 40 second timer to the existing BSSvSecondCallBack
one second delayed workqueue and trigger every 40 seconds when
bLinkPass == true.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:12 -07:00
Malcolm Priestley 17f3ced05f staging: vt6656: return from workqueues on fMP_DISCONNECTED
Return from work queues on flag fMP_DISCONNECTED to prevent
any scheduling threads past closing of device.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:12 -07:00
Malcolm Priestley 759e9eba43 staging: vt6656: main_usb.c correct pDevice->pControlURB goto
Correct goto of patch
staging: vt6656: make pControlURB available life time of driver.

Which should free_netdev.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:12 -07:00
Greg Kroah-Hartman dc070641ee Revert "staging:media:lirc: quoted string split across lines"
This reverts commit 7db78438d9.

It broke the build, and isn't ok.

Cc: Archana kumari <archanakumari959@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:40:57 -07:00
Ashvini Varatharaj e7ed40fb26 Staging: vt6656: adding spaces around '='
Fix checkpatch error: ERROR: spaces required around that '=' (ctx:WxV)

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:24:37 -07:00
Kelley Nielsen 1f13b0b8e7 staging: ft1000: remove formal get_request_value function header from ft1000-download.c
since there was no information in the C99 style header
for function get_request_type() that was not easily obtainable
by looking at the function, the header was completely removed.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:33 -07:00
Kelley Nielsen c50ede7975 staging: ft1000: remove formal get_request_type function header from ft1000-download.c
since there was no information in the C99 style header
for function get_request_type() that was not easily obtainable
by looking at the function, the header was completely removed.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:33 -07:00
Kelley Nielsen fafa4dcef4 staging: ft1000: convert formal put_handshake() header to single line comment
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:32 -07:00
Kelley Nielsen 89a03d3662 staging: ft1000: change ft1000-download.c header to /* */ comment style
Coding style requires that comments use the standard /* */ style
instead of C99 style.
Also removed author comment from a previous contributor

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:32 -07:00
Ashvini Varatharaj f222c70ccf Staging: rtl8192e: Replacing (u8*) with (u8 *)
Fix checkpatch error: ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:46:10 -07:00
Rashika Kheria 17cba02f9a Staging: btmtk_usb: Fix Sparse Warning of incorrect casting
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:110:16: warning: cast to restricted __le32
drivers/staging/btmtk_usb/btmtk_usb.c:299:23: warning: cast to restricted __le16

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:41:08 -07:00
Lars-Peter Clausen ef4d4d1b8f staging:iio: Allow to build SoC specific drivers when COMPILE_TEST is set
None of the SPEAr, LPC32XX or MXS ADC drivers have a compile time dependency on
their respective platform. So make it possible to build the drivers when
CONFIG_COMPILE_TEST is set. This makes it easier to compile test changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Lars-Peter Clausen 2cd1e1d8c1 staging:iio:mxs-lradc: Select STMP_DEVICE
The MXS ADC driver uses the stmp_reset_block() which is only provided when the
STMP_DEVICE Kconfig symbol is selected. Hence the driver should select this
symbol. So far this has not been a problem since the driver depends on ARCH_MXS,
which already selects STMP_DEVICE, but will become necessary once we allow the
driver to be built when COMPILE_TEST is selected.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Lars-Peter Clausen 8ecf5002f4 staging:iio:spear_adc: Fix sparse warning
The driver is casting from one __iomem pointer to another. Make sure to include
__iomem in the cast, otherwise sparse will complain with the following warning:

	drivers/staging/iio/adc/spear_adc.c:321:18: warning: cast removes address space of expression
	drivers/staging/iio/adc/spear_adc.c:320:33: warning: incorrect type in assignment (different address spaces)
	drivers/staging/iio/adc/spear_adc.c:320:33:    expected struct adc_regs_spear3xx [noderef] <asn:2>*adc_base_spear3xx
	drivers/staging/iio/adc/spear_adc.c:320:33:    got struct adc_regs_spear3xx *<noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Jovi Zhangwei 2c856b9e3e staging: ktap: remove unused <asm/syscall.h> header file
Fengguang Wu reported that ktap compile failed in mips,
the reason is it cannot found <asm/syscall.h> in mips arch.

Due to the code serviced by <asm/syscall.h> already removed,
so just simply remove the according header file to avoid
compiler failure.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 10:36:09 -07:00
Joe Perches ec83e611c2 staging: lustre: Use parenthesis around sizeof
Convert sizeof foo to sizeof(foo) to be more kernel style compatible.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:34:15 -07:00
Larry Finger 691dd0b7d2 staging: r8188eu: Convert driver to use external firmware
As originally submitted, this driver acquired its firmware from data
statements embedded in the source code. This information has been extracted
into a binary file that has been accepted into the linux-firmware git
repo as commit ffc47f1 entitled "rtlwifi: Add new firmware files for
rtl8188eu". This patch switches the driver to use this file, and deletes
the firmware data from the source. The TODO list is also updated.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:34:15 -07:00
Nandini Hanumanthagowda 851ec8cda8 staging: octeon: Removed space at start of line
Removed unnecessary space at start of line
to fix checkpatch.pl warning.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:30:35 -07:00
Nandini Hanumanthagowda b186410d6a staging: octeon: Fixed line over 80 chars warning
Fixed the line over 80 characters warning
to comply with linux cidung style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:30:35 -07:00
Ashvini Varatharaj a6df8a4f14 Staging: cxt1e1: remove space between function name and '('
Fix checkpatch warning: WARNING: space prohibited between function name
and open parenthesis '('

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:27:14 -07:00
Ashvini Varatharaj 6c762a4298 Staging: cxt1e1: moving { to the previous line
Fix checkpatch error: ERROR: that open brace { should be on the previous
line

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:27:14 -07:00
Kelley Nielsen 135a9ea056 staging: ft1000: convert formal get_handshake() function header to single line comment
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:24:49 -07:00
Kelley Nielsen de7a0cc15a staging: ft1000: convert formal function header to single line comment
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:24:49 -07:00
Kelley Nielsen 6f5519fd83 staging: ft1000: remove space before closing paren
as per coding style,
space prohibited before that close parenthesis

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:23:23 -07:00
Kelley Nielsen 610554d3ac staging: ft1000: remove space before address operator
as per coding style (checkpatch error),
space prohibited after that '&'

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:23:23 -07:00
Kelley Nielsen cfd9d1fad6 staging: ft1000: remove braces from one-line conditional
As per coding style,
braces {} are not necessary for single statement blocks

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:23:22 -07:00
Kelley Nielsen 0c5e802c1c staging: ft1000: change comment style
Coding style requires that comments use the standard /* */ style
instead of C99 style.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:19:59 -07:00
Nandini Hanumanthagowda 1f2a55f23f staging: speakup: remove unnecessary space before semicolon
Removed unnecessary space before semicolon which was
leading to checkpatch.pl warning.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:27 -07:00
Ashvini Varatharaj 1d2a01eb40 Staging: xgifb: remove space before semicolon
Fix checkpatch warning: WARNING:space prohibited before semicolon

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:27 -07:00
Kelley Nielsen e072241a31 staging: ft1000-usb: remove space between function name and open paren in ft1000_download.c
fixed checkpatch.pl warning: space prohibited between function name and
open parenthesis '('

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:26 -07:00
Nandini Hanumanthagowda c6e9a0565f staging: vt6655: Removed C99 style comments
C99 style comment // should not be used as
per coding guidelines.Usage of C99 style
comment // was resulting in checkpatch.pl
error.Hence replaced it with block comment /* */

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:26 -07:00
Nandini Hanumanthagowda f19454f877 staging: vt6656: Removed redundant code from iwctl file
There was one line which was added twice in the
definition of iwctl_handler and hence was redundant.
It was defined at line nos 1798 and 1818. Removed
the code at line 1818.
The redundant code was:
IW_HANDLER(SIOCSIWMLME, iwctl_siwmlme)
which was defined twice.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:26 -07:00
Maxime Jayat 3f79410c7c treewide: Fix common typo in "identify"
Correct common misspelling of "identify" as "indentify" throughout
the kernel

Signed-off-by: Maxime Jayat <maxime@artisandeveloppeur.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-14 15:31:06 +02:00
Krzysztof Hałasa 39e30a22d2 [media] SOLO6x10: Fix video headers on certain hardware
On certain platforms a sequence of dma_map_sg() and dma_unmap_sg()
discards data previously stored in the buffers. Build video headers
only after the DMA is completed.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:33:22 -03:00
Krzysztof Hałasa 4a61ad3c4a [media] SOLO6x10: Fix video encoding on big-endian systems
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:32:42 -03:00
Krzysztof Hałasa a3d2d196e1 [media] SOLO6x10: Remove unused #define SOLO_DEFAULT_GOP
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:32:25 -03:00
Krzysztof Hałasa 4518274606 [media] SOLO6x10: don't do DMA from stack in solo_dma_vin_region()
[m.chehab@samsung.com: Fix CodingStyle: don't use 2 statements on just one line]

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:32:04 -03:00
Lars-Peter Clausen d406fd9d9a staging:iio:spear_adc: Remove unused variable
Remove the scale_mv variable from the read_raw() callback. Fixes the following
warning:
	drivers/staging/iio/adc/spear_adc.c: In function 'spear_read_raw':
	drivers/staging/iio/adc/spear_adc.c:149:6: warning: unused variable 'scale_mv'

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:23:55 +01:00
Lars-Peter Clausen ec87197fb8 staging:iio:ad7291: Use event spec for threshold hysteresis
Register the event threshold hysteresis attributes by using the new
IIO_EV_INFO_HYSTERESIS event spec type. This allows us to throw away a good
portion of boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:04:22 +01:00
Lars-Peter Clausen ba1d79613d staging:iio:ad799x: Use event spec for threshold hysteresis
Register the event threshold hysteresis attributes by using the new
IIO_EV_INFO_HYSTERESIS event spec type. This allows us to throw away a good
portion of boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:02:19 +01:00
Lars-Peter Clausen 69582b8884 staging:iio:ad799x: Simplify threshold register look-up
Given a channel number the corresponding threshold and hysteresis registers can
easily be calculated. No need to use a look-up table.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:52:33 +01:00
Lars-Peter Clausen 3ea48e0124 staging:iio:tsl2x7x: Switch to new event config interface
Switch the tsl2x7x driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jon Brenner <jbrenner@taosinc.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:50:26 +01:00
Lars-Peter Clausen bda624b088 staging:iio:simple_dummy: Switch to new event config interface
Switch the simple_dummy driver to the new IIO event config interface as the old
one is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:48:39 +01:00
Lars-Peter Clausen 1489d629a4 staging:iio:ad7150: Switch to new event config interface
Switch the ad7150 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:47:41 +01:00
Lars-Peter Clausen 5b9e048a80 staging:iio:ad799x: Switch to new event config interface
Switch the ad799x driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:47:02 +01:00
Lars-Peter Clausen b80a674b8d staging:iio:ad7291: Switch to new event config interface
Switch the ad7291 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:46:31 +01:00
Lars-Peter Clausen 129c3f611a staging:iio:sca3000: Switch to new config interface
Switch the sca3000 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:46:02 +01:00
Lars-Peter Clausen 693101ddba staging:iio:lis2l02dq: Share threshold value between axis
The threshold event can be enabled/disabled separately, but the threshold value
is shared between all three axis.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:45:44 +01:00
Lars-Peter Clausen 8613e92cc3 staging:iio:lis3l02dq: Switch to new event config interface
Switch the lis3l02dq driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:42:39 +01:00
Sebastian Andrzej Siewior 11cb454f09 staging: iio: generic_buffer: initialize ret
The `ret´ variable is only initialized in the error case. For some reason
it was always != 0 while I played with generic_buffer so here is a patch.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:19:50 +01:00
Lars-Peter Clausen 9e69c935fa iio: Add reference counting for buffers
Since the buffer is accessed by userspace we can not just free the buffers
memory once we are done with it in kernel space. There might still be open file
descriptors and userspace still might be accessing the buffer. This patch adds
support for reference counting to the IIO buffers. When a buffer is created and
initialized its initial reference count is set to 1. Instead of freeing the
memory of the buffer the buffer's _free() function will drop that reference
again. But only after the last reference to the buffer has been dropped the
buffer the buffer's memory will be freed. The IIO device will take a reference
to its primary buffer. The patch adds a small helper function for this called
iio_device_attach_buffer() which will get a reference to the buffer and assign
the buffer to the IIO device. This function must be used instead of assigning
the buffer to the device by hand. The reference is only dropped once the IIO
device is freed and we can be sure that there are no more open file handles. A
reference to a buffer will also be taken whenever the buffer is active to avoid
the buffer being freed while data is still being send to it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:04:01 +01:00
Joe Perches a22526e48d staging: Remove unnecessary semicolons
These aren't necessary after switch, if and while statements.

Also remove some unnecessary braces where these
semicolons were removed around single statement
and some unnecessary blank lines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:47:06 -07:00
Wei Yongjun a7d7b01631 Staging: crystalhd: use vfree() instead of kfree()
Use vfree() instead of kfree() to free vmalloc()
allocated data.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:47:06 -07:00
Aaro Koskinen 5669601d92 staging: octeon-usb: use list.h for transactions
Use list.h helpers for transactions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:46:00 -07:00
Aaro Koskinen 4a23ee1bd7 staging: octeon-usb: use list.h for pipes
Use list.h helpers for pipes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:46:00 -07:00
Aaro Koskinen f011fefa8a staging: octeon-usb: use list_for_each_entry_safe()
Use list_for_each_entry_safe() when deleting all list items.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:46:00 -07:00
Aaro Koskinen 244544a185 staging: octeon-usb: use list_del_init()
Replace list_del() + INIT_LIST_HEAD() with list_del_init().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen d2695a8a3d staging: octeon-usb: use dynamic allocation for pipes
Use dynamic memory allocation for pipes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen a2dfef06e6 staging: octeon-usb: use dynamic allocation for transactions
Use dynamic memory allocation for transactions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen f121910396 staging: octeon-usb: use a single .h file
Merge USBC and USBN register definitions into a single header
file. Although all HW definitions are purely internal to the driver,
it's better to keep them separate due to the large size of the file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen 7d7bc26b1d staging: octeon-usb: CN3xxx: program p_xenbn and p_rclk through p_rtype
Do the clock setup through p_rtype on all OCTEONs. This enables to get
rid of duplicated register definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen 34b70b9e05 staging: octeon-usb: delete cvmx_usbnx_clk_ctl_cn50xx
Add the missing bits to common clk ctl definition, and we can delete
duplicated definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen d8d8e148fd staging: octeon-usb: delete unused cvmx_usbnx_usbp_ctl_status definitions
cvmx_usbnx_usbp_ctl_status was multiplied for different OCTEONS and all
those definitions are unused. Delete them.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:58 -07:00
Xenia Ragiadakou 9f627100b9 staging: rtl8192u: copy dot11d.h in ieee80211/dot11d.h and remove it
This patch copies the content of dot11d.h into ieee80211/dot11d.h and then
removes it because practically the two header files are the same with the
difference that in dot11d.h some checkpatch warnings have been corrected.
This is done because the duplication of dot11d.h is unnecessary since the
structures and functions that defines are used directly only inside ieee80211/.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou 8fa9cf5d8a staging: rtl8192u: remove ieee80211_crypt.h
This patch removes ieee80211_crypt.h because this header file is the same as
ieee80211/ieee80211_crypt.h and the structures and functions declared in it
are used directly only inside ieee80211/.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou deba326bfd staging: rtl8192u: remove r8180_pm.c and r8180_pm.h
This patch removes r8180_pm.h and r8180_pm.c from rtl8192u because they
are not used anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou 1bafe45f9b staging: rtl8192u: fix line size in r819xU_HTType.h
This patch fixes the following checkpatch warning in r819xU_HTType.h:
WARNING: line over 80 characters

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:55 -07:00
Xenia Ragiadakou b812fd3b57 staging: rtl8192u: add parenthesis around complex macros in r819xU_HTType.h
This patch fixes the following checkpatch error:
ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:55 -07:00
Xenia Ragiadakou b3052681e8 staging: rtl8192u: add space after ',' in r819xU_HTType.h
This patch fixes the following checkpatch error:
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 1f7750343d staging: rtl8192u: fix alignment in r819xU_HTType.h
This patch fixes some alignment issues in r819xU_HTType.h to impreove code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 3652701608 staging: rtl8192u: fix comments in r819xU_HTType.h
This patch fixes comments in r819xU_HTType.h by:
* replacing // commments with /* */ comments
* removing author and date information from comments
* removing unnecessary comments

This is done to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 5b33b605e2 staging: rtl8192u: fix space around braces in r819xU_HTType.h
This patch fixes the white space around braces in r819xU_HTType.h according
to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 889cfe2f03 staging: rtl8192u: use __packed instead of __attribute__((packed))
This patch fixes the following checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou f96f8df28c staging: rtl8192u: fix open brace position in r819xU_cmdpkt.h
This patch fixes the following checkpatch warning and error:
WARNING: missing space after enum definition
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou feada066c8 staging: rtl8192u: fix alignment in r819xU_cmdpkt.h
This patch fixes alignment issues in r819xU_cmdpkt.h to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou acd537427c staging: rtl8192u: fix space after ( in r819xU_cmdpkt.h
This patch removes prohibited space after ( in r819xU_cmdpkt.h according to
the linux kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou b7cc1d0ce9 staging: rtl8192u: fix space at the start of lines in r819xU_cmdpkt.h
This patch fixes the following checkpatch warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou 56340097ca staging: rtl8192u: fix comments in r819xU_cmdpkt.h
This patch fixes the comments in r819xU_cmdpkt.h by:
* removing any empty or unnecessary comments
* replacing the // comments with /* */ comments
* removing date and author information from comments

This is done to improve code readability and to conform to linux kernel
coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou b777736b47 staging: rtl8192u: fix line size in r819xU_cmdpkt.h
This patch reduces the line length below 80 chars to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou 8f519cad49 staging: rtl8192u: add space after } and , in r819xU_cmdpkt.h
This patch fixes white space after } and , so that the code becomes more
readable and conforms to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou aa0cb59cfa staging: rtl8192u: remove #ifdef JOHN_
This patch removes the guards #ifdef JOHN_HWSEC, #ifdef JOHN_DUMP_TXDESC and
because the code inside them calls some undefined functions (e.g read_rtl8225,
rtl8187_read_phy etc).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Sachin Kamat b806ad483a staging: vt6655: Use NULL instead of 0
Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat 875d2a134e staging: rtl8192u: Use NULL instead of 0
Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat 440ca3f0c5 staging: lirc: Do not use 0 for NULL pointer
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat 968a4e9208 staging: dgnc: dgnc_tty: Do not use 0 for NULL pointer
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat aad7b60bf1 staging: lustre: Do not use 0 for NULL pointer in console.c
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat a0d6f2b1da staging: line6: midi: Use NULL instead of 0 for pointers
Use NULL instead of 0 for pointers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat 53fa1f4f1f staging: dgap: dgap_tty: Do not use 0 for pointers
0 should not be used instead of NULL for pointers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat fa5cd4cf1b staging: dgap: dgap_fep5: Do not use 0 for NULL pointer
Do not compare NULL pointer with 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat 0b5aff00a7 staging: dgap: dgap_fep5: Remove braces around return
Braces are not needed around return values.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat 565c509587 staging: dgap: dgap_fep5: Remove braces around single line statements
Single line statements do not require braces.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Ian Abbott d8515652ef staging: comedi: s626: prefix macros in s626.h
Prefix the names of all the macros defined in "s626.h" with `S626_`.

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>
2013-10-11 15:34:22 -07:00
Ian Abbott 676921c9d2 staging: comedi: s626: prefix macros in s626.c
Prefix the macros defined in "s626.c" with `S626_`.  Macro `VECT0` is
unused, so remove it.

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>
2013-10-11 15:34:22 -07:00
Ian Abbott 31de1948d8 staging: comedi: s626: prefix function and variable names
Add the prefix `s626_` to all the static variables and functions that
don't already have it.

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>
2013-10-11 15:34:22 -07:00
Ian Abbott dbb263f5bd staging: comedi: s626: rename struct buffer_dma
Re-tag `struct buffer_dma` to `struct s626_buffer_dma` to avoid
potential namespace clashes.

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>
2013-10-11 15:34:21 -07:00
Ian Abbott 8e06d66287 staging: comedi: s626: move struct buffer_dma
Move the declaration of `struct buffer_dma` from "s626.h" to "s626.c" as
it seems more at home there.  After this move, "s626.h" just contains
macros related to hardware registers.

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>
2013-10-11 15:34:21 -07:00
Ian Abbott a3ae88f83b staging: comedi: s626: make trimchan[] and trimadrs[] const
Declare the static variables `trimchan[]` and `trimadrs[]` as constant
data.

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>
2013-10-11 15:34:21 -07:00
Ian Abbott bb49cddc02 staging: comedi: s626: add mmiowb() calls
`s626_mc_enable()` is often called to enable some function in a control
register after setting up some other registers.  Precede the write to
the control register with a call to `mmiowb()` to preserve mmio write
ordering.

`s626_mc_disable()` is called to disable some function in a control
register and is often followed up by writes to other registers.  Follow
the write to the control register with a call to `mmiowb()` to preserve
mmio write ordering.

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>
2013-10-11 15:34:21 -07:00
Ian Abbott c3e3a56d40 staging: comedi: s626: remove TRUE and FALSE macros
"s626.h" defines the macros `TRUE` and `FALSE` if they are not already
defined, yielding the expected numeric values.  Remove the macros and
replace their usage with the values `true` and `false`, respectively.

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>
2013-10-11 15:34:21 -07:00
Ian Abbott 3f1f219ce1 staging: comedi: s626: move s626_enc_chan_info[]
Move `s626_enc_chan_info[]` and remove its forward declaration.

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>
2013-10-11 15:34:21 -07:00
Ian Abbott bc284a2aa5 staging: comedi: s626: move encoder functions part 3
Move the final lot of encoder functions to help avoid the forward
declaration of `s626_enc_chan_info[]`.

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>
2013-10-11 15:34:20 -07:00
Ian Abbott 17afeac2fd staging: comedi: s626: move encoder functions part 2
Move some more functions to help avoid the forward declaration of
`s626_enc_chan_info[]`.

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>
2013-10-11 15:34:20 -07:00
Ian Abbott 010be96fb6 staging: comedi: s626: move encoder functions part 1
Move some functions to help avoid the forward declaration of
`s626_enc_chan_info[]`.

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>
2013-10-11 15:34:20 -07:00
Ian Abbott 3a305a66bb staging: comedi: s626: remove encpriv macro
The `encpriv` macro relies on a local variable `dev` (of type `struct
comedi_device *`) being set correctly.  By a convoluted path involving
the `private` data pointer of subdevice 5 (the encoder (counter)
subdevice), the macro always yields a pointer to the first element of
the static array `enc_private_data[]`.  That holds statically constant
data for each of 6 encoder channels.

Instead of using the `encpriv` macro, just access the array it points to
directly and get rid of the macro.  Don't bother initializing the
`private` member of the encoder subdevice any more.  Since
`enc_private_data[]` now has nothing to so with subdevice private data,
rename `enc_private_data[]` to `s626_enc_chan_info[]` and rename its
type from `struct enc_private` to `struct s626_enc_info`.  Since the
array contains unchanging, static information, declare it `const` and
declare all the variables that point to it `const`.

A forward declaration of `s626_enc_chan_info[]` has been added
temporarily and will be removed by a later patch.

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>
2013-10-11 15:34:20 -07:00
Ian Abbott f1f7efce3b staging: comedi: s626: rename CamelCase variables
Rename the remaining CamelCase parameters and variables.

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>
2013-10-11 15:34:20 -07:00
Ian Abbott 19436a0dd7 staging: comedi: s626: rename CamelCase functions
Rename the remaining non-lower-case functions.

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>
2013-10-11 15:34:20 -07:00
Ian Abbott cffd7ab946 staging: comedi: s626: remove a variable from set_mode_a() and _b()
The `set_mode_a()` and `set_mode_b()` functions use a local variable
`setup` which is initialized to the value of parameter `Setup` which is
not used further.  Get rid of the local variable and rename the
parameter to `setup`.

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>
2013-10-11 15:34:19 -07:00
Ian Abbott b075ac8e93 staging: comedi: s626: rename CamelCase in struct enc_private
Rename the CamelCase members of `struct enc_private`.  Since most of
those are function pointers pointing to functions with similar names as
the members, rename the functions they point to as well.

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>
2013-10-11 15:34:19 -07:00
Ian Abbott 07a36d66fa staging: comedi: s626: rename CamelCase in struct s626_private
Rename the CamelCase members of `struct s626_private`.

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>
2013-10-11 15:34:19 -07:00
Ian Abbott 3a3875067e staging: comedi: s626: replace CamelCase struct bufferDMA
Rename `struct bufferDMA` and its members to avoid CamelCase.

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>
2013-10-11 15:34:19 -07:00
Ian Abbott 6e3fc69d4c staging: comedi: s626: remove duplicate macros I2C_B0, I2C_B1, I2C_B2
The `I2C_B0(ATTR, VAL)`, `I2C_B1(ATTR, VAL)` and `I2C_B2(ATTR, VAL)`
macros are defined identically in "s626.h" and "s626.c".  Remove the
duplicates from "s626.c".

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>
2013-10-11 15:34:19 -07:00
Ian Abbott d5512f5b5b staging: comedi: s626: remove I2CR and I2CW macros
The `I2CR` and `I2CW` macros expand to the I2C read and write addresses,
respectively.  They are only used in one place each and include the name
of a local variable `devpriv` in their expansion.

Get rid of the macros and expand them in place.

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>
2013-10-11 15:34:19 -07:00
Ian Abbott e6132fc9ad staging: comedi: s626: rename ai_continous
Rename the `ai_continous` member of `struct s626_private` to
`ai_continuous`.

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>
2013-10-11 15:34:18 -07:00
Ian Abbott 498c5070cf staging: comedi: s626: remove PCI ID defines
The Sensoray 626 is based on the Philips SAA7146 chip using the Philips
vendor and device ID for the chip, but with custom subdevice and
subvendor IDs.  Use the Philips IDs in the PCI device table and replace
the macros for the subvendor and subdevice IDs with open-coded values.

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>
2013-10-11 15:34:18 -07:00
Ian Abbott 869db884c7 staging: comedi: s626: remove unused DMAHandle
The `DMAHandle` member of `struct bufferDMA` in "s626.h" is unused, so
remove it.

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>
2013-10-11 15:34:18 -07:00
Ian Abbott 730b8e1557 staging: comedi: s626: convert a printk()
Convert a printk() to a dev_err().

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>
2013-10-11 15:34:18 -07:00
Ian Abbott 8ee5261141 staging: comedi: s626: tidy up main source code file
Tidy up the source code in "s626.c" and make it (slightly) more
readable.  It's mostly whitespace changes although some large statements
have been split into smaller statements.  It fixes most of the
checkpatch errors and warnings.

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>
2013-10-11 15:34:18 -07:00
Ian Abbott 7f32c7c444 staging: comedi: s626: tidy up comments at top of file
Make the comments at the top of the file conform to the CodingStyle.

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>
2013-10-11 15:34:18 -07:00
Ian Abbott eb4700edd9 staging: comedi: s626: tidy the header file a bit
Tidy up the "s626.h" header file a bit, cleaning up the whitespace and
fixing overlength lines.  Add multiple inclusion protection (even though
it's only included once and only by "s626.c").  Remove unnecessary
driver comment near the start of the file as it is more or less the same
as the one in "s626.c".  Remove obviously unused/useless stuff.

I'm not sure what to do about the INTEL/MOTOROLA platform selection in
the file.  I've left it alone (set to INTEL) for now.

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>
2013-10-11 15:34:17 -07:00
Philipp Zabel bd3665c94a staging: drm/imx: Enable DRM PRIME support
Lets the IPU driver make use of the PRIME functionality introduced
by the "drm: GEM CMA: Add DRM PRIME support" patch.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:34 -07:00
Philipp Zabel b8d181e408 staging: drm/imx: add drm plane support
This patch adds support for a drm overlay plane on DI0 using the DP.
In principle, the overlay plane could also be used on DI1, but to switch
the overlay plane between display interfaces, the base planes would have
to be exchanged transparently while both display interfaces are inactive.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Sascha Hauer 6ee4d7fe1b staging: drm/imx: fix pageflip events during device close
During a device close the drm core frees all pending events in
drm_events_release(). If at that time a pageflip is pending the
interrupt handler will try to complete the now unitialized
event resulting in a NULL pointer exception. Seen on imx-drm
when userspace is killed during a page flip.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Philipp Zabel b8fbb34181 staging: drm/imx: ipuv3-crtc: remove unused struct ipu_framebuffer
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Philipp Zabel 974aa74318 staging: drm-imx: add DRM_FORMAT_BGR888 to ipu crtc driver
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Sascha Hauer fb822a395f staging: drm/imx: make waiting for idle channel optional
Currently we wait for a channel until it's idle before actually
disabling it. This is not needed for all channels though, so make
waiting for idle a separate function and call it where necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Philipp Zabel 0b186416c9 staging: drm/imx: Add 24-bit BGR support to DC
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Philipp Zabel 38fc7b311e staging: drm/imx: add BGR565 format
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:32 -07:00
Philipp Zabel 7cb17797fd staging: drm/imx: fix RGB formats, make ipu_cpmem_set_fmt take a drm_fourcc
The drm fourccs define formats not available as video4linux pixel formats,
such as DRM_FORMAT_BGR565, or the DRM_FORMAT_RGBX/BGRX variants.
Also, contrary to the v4l2 formats, the drm formats are well defined.

This patch also fixes the BGRA32 and RGB/RGB24 internal formats to use a
common internal representation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:32 -07:00
Philipp Zabel e56af86646 staging: drm/imx: make struct ipu_rgb format definitions const
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:32 -07:00