pandora-kernel.git
8 years agoStaging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings
Adrian Remonda [Fri, 14 Aug 2015 10:18:01 +0000 (12:18 +0200)]
Staging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings

This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the pointer test against 0 with a logical test.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: mostcore/core.c. Fix "missing static keyword" warnings
Adrian Remonda [Fri, 14 Aug 2015 10:18:00 +0000 (12:18 +0200)]
Staging: most: mostcore/core.c. Fix "missing static keyword" warnings

This is a patch to the mostcore/core.c file. It makes
several local functions and structures static to prevent global
visibility.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: Remove unnecessary externs
Joe Perches [Mon, 10 Aug 2015 21:51:22 +0000 (14:51 -0700)]
staging: most: Remove unnecessary externs

Using 'extern' is not necessary for function prototypes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/most: fix return value for DIM_GetChannelState
Tomas Melin [Sun, 9 Aug 2015 14:08:41 +0000 (17:08 +0300)]
staging/most: fix return value for DIM_GetChannelState

Return NULL instead of 0 for invalid input.

Signed-off-by: Tomas Melin <tomas.melin@iki.fi>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre/llite: get rid of unused ll_super_blocks list
Oleg Drokin [Sun, 9 Aug 2015 00:09:06 +0000 (20:09 -0400)]
staging/lustre/llite: get rid of unused ll_super_blocks list

ll_super_blocks became unused quite a while ago with switch
to the new CLIO code.
So this patch removes the list, ll_sb_lock spinlock that guards it
and superblock info ll_list linkage.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: serial2002: Use monotonic clock
Abhilash Jindal [Tue, 11 Aug 2015 14:31:53 +0000 (10:31 -0400)]
staging: comedi: serial2002: Use monotonic clock

Wall time obtained from do_gettimeofday is susceptible to sudden jumps due to
user setting the time or due to NTP.

Monotonic time is constantly increasing time better suited for comparing two
timestamps.

Signed-off-by: Abhilash Jindal <klock.android@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_usb6501: fix possible out-of-bounds access
H Hartley Sweeten [Mon, 10 Aug 2015 17:28:08 +0000 (10:28 -0700)]
staging: comedi: ni_usb6501: fix possible out-of-bounds access

Coverity reports a possible Out-of-bounds access (ARRAY_VS_SINGLETON)
with the 'const u8 *port' parameter passed to ni6501_port_command().
This param is an actual array for the SET_PORT_DIR operation, called
by ni6501_dio_insn_config(). But for the WRITE_PORT and READ_PORT
operations, called by ni6501_dio_insn_bits(), it is just the address
of an u8 local variable.

Fix the coverity issue by changing the parameter to an unsigned int
and pass the raw values from ni6501_dio_insn_config() and
ni6501_dio_insn_bits(). ni6501_port_command() then handles the masking
and shifting needed to load the value into the u8 transmit buffer.

For consistency, change the access of the 'bitmap' parameter from an
array access to a pointer operation.

Reported-by: coverity (CID 1248624)
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge tag 'iio-for-4.3b-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Wed, 12 Aug 2015 19:43:41 +0000 (12:43 -0700)]
Merge tag 'iio-for-4.3b-2' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of new device support, features and cleanup for the 4.3 cycle.
Take 2 also includes a fix set that was too late for the 4.2 cycle.

As we had a lot of tools and docs work in this set, I have broken those
out into their own categories in this description.

Fixes from the pull request '4th set of IIO fixes for the 4.2 cycle'.
* Poll functions for both event chardev and the buffer one were returning
  negative error codes (via a positive value).
* A recent change to lsiio adding some error handling that was wrong and
  stopped the tool working.
* bmg160 was missing some dependencies in Kconfig
* berlin2-adc had a misshandled register (wrote a value rather than a bitmap)

New device support
* TI opt3001 light sensor
* TXC PA12 ALS and proximity sensor.
* mcp3301 ADC support (in mcp320x driver)
* ST lsm303agr accelerometer and magnetometer drivers (plus some st-sensors
  common support to allow different WHOAMI register addresses, devices with
  fixed scale and allow interrupt equiped magnetometers).
* ADIS16305, ADIS16367, ADIS16445IMUs (in the adis16400 driver)
* ADIS16266 gyro (in the adis16260 driver)
* ADIS16137 gyro (in the adis16136 driver)

New functionality
* mmc35240 DT bindings.
* Inverse unit conversion macros to aid handing of values written to sysfs
  attributes.

Core cleanup
* Forward declaration of struct iio_trigger to avoid a compile warning.

Driver cleanup / fixes
* mxs-lradc
  - Clarify which parts are supported.
  - Fix spelling erorrs.
  - Missing/extra includes
  - reorder includes
  - add datasheet name listings for all usable channels (to allow them
    to be bound by name from consumer drivers)
* acpi-als - add some function prefixes as per general iio style.
* bmc150_magn - replace a magic value with the existing define.
* vf610 - determine possible sample frequencies taking into account the
  electrical characteristics (defining a minimum sample time)
* dht11
  - whitespace
  - additional docs
  - avoid mulitple assignments in one line
  - Use the new funciton ktime_get_resolution_ns to cleanup a nasty trick
    previously used for timing.
* Fix all drivers that consider 0 a valid IRQ for historical reasons.
* Export I2C module alias info where previously missing (to allow autoprobing)
* Export OF module alias info where previously missing.
* mmc35240 - switch some variables into arrays to improve readability.
* mlx90614 - define some magic numbers for readability.
* bmc150_magn
  - expand area locked by a mutex to cover all the use of the
    data->buffer.
  - use descriptive naming for a mask instead of a magic value.
* berin2-adc
  - pass up an error code rather that a generic error
  - constify the iio_chan_spec
  - some other little tidy ups.
* stk8312
  - fix a dependency on triggered buffers in kconfig
  - add a check for invalid attribute values
  - improve error handling by returning error codes where possible and
    return immediately where relevant
  - rework macro defs to use GENMASK etc
  - change some variable types to reduce unnecessary casting
  - clean up code style
  - drop a local buffer copy for bulk reads and use the one in data->buffer
     instead.
* adis16400 - the adis16448 gyroscope scale was wrong.
* adis16480 - some more wrong scales for various parts.
* adis16300 - has an undocumented product id and serial number registers so
  use them.
* iio_simple_dummy - fix some wrong code indentation.
* bmc150-accel - use the chip ID to detect the chip present rather than
  verifying the expected part was there.  This was in response to a wrong
  ACPI entry on the WinBook TW100.
* mma8452
  - fix _get_hp_filter_index
  - drop a double include
  - pass up an error code rather than rewriting it
  - range check input values to attribute writes
  - register defs tidy up using GENMASK and reordering them to be easier to
    follow.
  - various coding style cleanups
  - put the Kconfig entry in the write place (alphabetically).

Tools related
* Tools cleanup - drop an explicity NULL comparison, some unnecessary braces,
  use the ARRAY_SIZE macro, send error messages to stderr instead of dropping
  them in the middle of normal output.
* Fix tools to allow that scale and offset attributes are optional.
* More tools fixes including allowing true 32bit data (previously an overflow
  prevented more than 31bits)
* Drop a stray header guard that ended up in a c file.
* Make calc_digits static as it isn't exported or in the header.
* Set ci_array pointer to NULL after free as a protection against non safe
  usage of the tools core code.  Also convert a double pointer to a single
  one as the extra level of indirection was unnecessary.

Docs
* DocBook introduction by Daniel Baluta.  Glad we are beginning to
  draw together some more introductory docs to suplement the various
  tools / examples.
* Drop bytes_per_datum sysfs attribute docs as it no longer exists.
* A whole load of missing / fixing of kernel-doc for the core of IIO.
* Document the trigger name sysfs attribute in the ABI docs.
* Minor typos in the ABI docs related to power down modes.

8 years agoiio: event: Remove negative error code from iio_event_poll
Cristina Opriceana [Mon, 3 Aug 2015 10:00:47 +0000 (13:00 +0300)]
iio: event: Remove negative error code from iio_event_poll

Negative return values are not supported by iio_event_poll since
its return type is unsigned int.

Fixes: f18e7a068a0a3 ("iio: Return -ENODEV for file operations if the device has been unregistered")

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: industrialio-buffer: Fix iio_buffer_poll return value
Cristina Opriceana [Mon, 3 Aug 2015 10:37:40 +0000 (13:37 +0300)]
iio: industrialio-buffer: Fix iio_buffer_poll return value

Change return value to 0 if no device is bound since
unsigned int cannot support negative error codes.

Fixes: f18e7a068 ("iio: Return -ENODEV for file operations if the
device has been unregistered")

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: lsiio: fix error code handling error
Linus Walleij [Tue, 4 Aug 2015 14:21:49 +0000 (16:21 +0200)]
iio: lsiio: fix error code handling error

commit acf50b3586f8d8a7530b905e111dda41876d38f4
"tools:iio:lsiio: add error handling"
introduced error handling of errors returned from
read_sysfs_string(), but with a simple if (retval),
missing the fact that these functions return a positive
value if the read was successful.

As a result lsiio regresses and does not show any
devices on my filesystem. Fix this by checking for
only negative error codes.

Cc: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required
Markus Pargmann [Wed, 29 Jul 2015 13:46:03 +0000 (15:46 +0200)]
iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required

This patch adds selects for IIO_BUFFER and IIO_TRIGGERED_BUFFER. Without
IIO_BUFFER, the driver does not compile.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:adc:berlin2-adc: Fix register definition
Hartmut Knaack [Mon, 27 Jul 2015 22:38:57 +0000 (00:38 +0200)]
iio:adc:berlin2-adc: Fix register definition

Active channel number is stored in BERLIN2_SM_CTRL as value, instead of a
bit map.
The masks for channel interrupts and data ready are a 16 bits wide bit
map each, instead of just 4 bits.

Also correct the data mask for the temperature sensor, which was
Reported-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging: ozwpan: Remove from tree
Jason A. Donenfeld [Mon, 10 Aug 2015 15:49:51 +0000 (17:49 +0200)]
staging: ozwpan: Remove from tree

Ozwpan is completely unmaintained and potentially a security problem. As
this is a staging driver, it should be removed, since it has been
abandoned.

Cc: Shigekatsu Tateno <shigekatsu.tateno@atmel.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge 4.2-rc6 into staging-next
Greg Kroah-Hartman [Mon, 10 Aug 2015 16:07:25 +0000 (09:07 -0700)]
Merge 4.2-rc6 into staging-next

We want the IIO and staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoLinux 4.2-rc6
Linus Torvalds [Sun, 9 Aug 2015 19:54:30 +0000 (15:54 -0400)]
Linux 4.2-rc6

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sun, 9 Aug 2015 07:38:42 +0000 (09:38 +0200)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input subsystem fixes from Dmitry Torokhov:
 "Just small ALPS and Elan touchpads, and other driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: elantech - add special check for fw_version 0x470f01 touchpad
  Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning
  Input: alps - only Dell laptops have separate button bits for v2 dualpoint sticks
  Input: axp20x-pek - add module alias
  Input: turbografx - fix potential out of bound access

8 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 9 Aug 2015 02:59:21 +0000 (05:59 +0300)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "Another round of MIPS fixes for 4.2.  No area does particularly stand
  out but we have a two unpleasant ones:

   - Kernel ptes are marked with a global bit which allows the kernel to
     share kernel TLB entries between all processes.  For this to work
     both entries of an adjacent even/odd pte pair need to have the
     global bit set.  There has been a subtle race in setting the other
     entry's global bit since ~ 2000 but it take particularly
     pathological workloads that essentially do mostly vmalloc/vfree to
     trigger this.

     This pull request fixes the 64-bit case but leaves the case of 32
     bit CPUs with 64 bit ptes unsolved for now.  The unfixed cases
     affect hardware that is not available in the field yet.

   - Instruction emulation requires loading instructions from user space
     but the current fast but simplistic approach will fail on pages
     that are PROT_EXEC but !PROT_READ.  For this reason we temporarily
     do not permit this permission and will map pages with PROT_EXEC |
     PROT_READ.

  The remainder of this pull request is more or less across the field
  and the short log explains them well"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: Make set_pte() SMP safe.
  MIPS: Replace add and sub instructions in relocate_kernel.S with addiu
  MIPS: Flush RPS on kernel entry with EVA
  Revert "MIPS: BCM63xx: Provide a plat_post_dma_flush hook"
  MIPS: BMIPS: Delete unused Kconfig symbol
  MIPS: Export get_c0_perfcount_int()
  MIPS: show_stack: Fix stack trace with EVA
  MIPS: do_mcheck: Fix kernel code dump with EVA
  MIPS: SMP: Don't increment irq_count multiple times for call function IPIs
  MIPS: Partially disable RIXI support.
  MIPS: Handle page faults of executable but unreadable pages correctly.
  MIPS: Malta: Don't reinitialise RTC
  MIPS: unaligned: Fix build error on big endian R6 kernels
  MIPS: Fix sched_getaffinity with MT FPAFF enabled
  MIPS: Fix build with CONFIG_OF=y for non OF-enabled targets
  CPUFREQ: Loongson2: Fix broken build due to incorrect include.

8 years agoMerge branch 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
Linus Torvalds [Sun, 9 Aug 2015 02:56:31 +0000 (05:56 +0300)]
Merge branch 'for-linus-4.2' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fix from Chris Mason:
 "We have a btrfs quota regression fix.

  I merged this one on Thursday and have run it through tests against
  current master.

  Normally I wouldn't have sent this while you were finalizing rc6, but
  I'm feeding mosquitoes in the adirondacks next week, so I wanted to
  get this one out before leaving.  I'll leave longer tests running and
  check on things during the week, but I don't expect any problems"

* 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: qgroup: Fix a regression in qgroup reserved space.

8 years agoMerge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Linus Torvalds [Sun, 9 Aug 2015 02:54:27 +0000 (05:54 +0300)]
Merge branch 'for-rc' of git://git./linux/kernel/git/rzhang/linux

Pull thermal management fixes from Zhang Rui:
 "Specifics:

   - fix an error that "weight_attr" sysfs attribute is not removed
     while unbinding.  From: Viresh Kumar.

   - fix power allocator governor tracing to return the real request.
     From Javi Merino.

   - remove redundant owner assignment of hisi platform thermal driver.
     From Krzysztof Kozlowski.

   - a couple of small fixes of Exynos thermal driver.  From Krzysztof
     Kozlowski and Chanwoo Choi"

* 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  thermal: Drop owner assignment from platform_driver
  thermal: exynos: Remove unused code related to platform_data on probe()
  thermal: exynos: Add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF
  thermal: exynos: Disable the regulator on probe failure
  thermal: power_allocator: trace the real requested power
  thermal: remove dangling 'weight_attr' device file

8 years agoStaging: lustre/lustre/ptlrpc: service.c: Fixed issue with global integer being initi...
Daniel Machon [Sat, 8 Aug 2015 18:43:25 +0000 (20:43 +0200)]
Staging: lustre/lustre/ptlrpc: service.c: Fixed issue with global integer being initialized to 0

Fixed global integer initialization issue.
Global variables should not be explicitly initialized to 0 or NULL.

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre/lnet/selftest: framework.c: Fixed coding style issues
Daniel Machon [Sat, 8 Aug 2015 18:34:59 +0000 (20:34 +0200)]
Staging: lustre/lnet/selftest: framework.c: Fixed coding style issues

Fixed coding style issues where statement should be on the next line

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: wilc_platform.h: Fixed include guard spelling error
Daniel Machon [Sat, 8 Aug 2015 18:00:07 +0000 (20:00 +0200)]
Staging: wilc1000: wilc_platform.h: Fixed include guard spelling error

Fixed spelling error

Signed-off-by: Daniel Machon <dmachon.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove braces for single statement 'if' and 'else'
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:36 +0000 (17:41 +0530)]
staging: wilc1000: Remove braces for single statement 'if' and 'else'

Fixes the checkpatch.pl warning - braces {} are not necessary for any arm
of this statement

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove ' ' before quoted '\n'
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:35 +0000 (17:41 +0530)]
staging: wilc1000: Remove ' ' before quoted '\n'

Fixes the checkpatch.pl warning -
'unnecessary whitespace before a quoted newline'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Remove unused extern declarations
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:34 +0000 (17:41 +0530)]
staging: wilc1000: Remove unused extern declarations

'extern' declarations which are not referenced within the file are
removed.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: Add space between the braces
Chandra S Gorentla [Sat, 8 Aug 2015 12:11:33 +0000 (17:41 +0530)]
staging: wilc1000: Add space between the braces

Inserted space between nested braces.  This fixes the checkpatch.pl
error - space required after that close brace '}'.

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agotools: iio: remove unnecessary double pointer
Joo Aun Saw [Fri, 24 Jul 2015 15:23:29 +0000 (01:23 +1000)]
tools: iio: remove unnecessary double pointer

Remove unnecessary double pointer from channel sorting function.

Signed-off-by: Joo Aun Saw <jasaw@dius.com.au>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agotools: iio: Set caller's ci_array pointer to NULL after free
Joo Aun Saw [Fri, 24 Jul 2015 15:23:28 +0000 (01:23 +1000)]
tools: iio: Set caller's ci_array pointer to NULL after free

On error, caller's ci_array is freed and set to NULL to avoid
potential double free if some other user of this code is not
sufficiently careful. Counter is reset to zero for consistency.

Signed-off-by: Joo Aun Saw <jasaw@dius.com.au>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: Fix typos in ABI documentation
Vladimir Barinov [Wed, 29 Jul 2015 12:57:41 +0000 (15:57 +0300)]
iio: Fix typos in ABI documentation

Fix typos in ABI documentation

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: reorder Kconfig entry
Hartmut Knaack [Sun, 2 Aug 2015 20:43:52 +0000 (22:43 +0200)]
iio:accel:mma8452: reorder Kconfig entry

Move the entry in Kconfig to its alphabetically correct position.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: coding style cleanup
Hartmut Knaack [Sun, 2 Aug 2015 20:43:51 +0000 (22:43 +0200)]
iio:accel:mma8452: coding style cleanup

Some coding style cleanups, mainly indicated by checkpatch.pl, which
includes indentation changes, drop spaces after casts and befor tabs.
Also insert empty lines after logical blocks and before unconditional
returns.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: rework register definitions
Hartmut Knaack [Sun, 2 Aug 2015 20:43:50 +0000 (22:43 +0200)]
iio:accel:mma8452: rework register definitions

Rework register definitions to be sorted by register and bit number, with
bit definitions cascaded under the appropriate register, use GENMASK for
consecutive bitmasks and realign properly.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: check values to be written
Hartmut Knaack [Sun, 2 Aug 2015 20:43:49 +0000 (22:43 +0200)]
iio:accel:mma8452: check values to be written

Check values to be written to the device for valid lower and upper bounds.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: pass up real error code
Hartmut Knaack [Sun, 2 Aug 2015 20:43:48 +0000 (22:43 +0200)]
iio:accel:mma8452: pass up real error code

Pass up the error code provided by functions.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: drop double include
Hartmut Knaack [Sun, 2 Aug 2015 20:43:47 +0000 (22:43 +0200)]
iio:accel:mma8452: drop double include

One inclusion of linux/iio/trigger_consumer.h is sufficient.

Fixes:  ae6d9ce05691b ("iio: mma8452: Add support for interrupt driven triggers.")
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:mma8452: fix _get_hp_filter_index
Hartmut Knaack [Sun, 2 Aug 2015 20:43:46 +0000 (22:43 +0200)]
iio:accel:mma8452: fix _get_hp_filter_index

To iterate through the available frequencies of mma8452_hp_filter_cutoff[],
the array size of a row of that table needs to be provided to
_get_int_plus_micros_index().

Fixes:  1e79841a00e46 ("iio: mma8452: Add highpass filter configuration.")

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:bmc150-accel: Use the chip ID to detect sensor variant
Bastien Nocera [Thu, 23 Jul 2015 15:21:07 +0000 (17:21 +0200)]
iio:accel:bmc150-accel: Use the chip ID to detect sensor variant

Instead of using the I2C or ACPI ID to determine which variant of
the chipset to use, determine that from the chip ID.

Under Windows, the same driver is used for those variants and, despite
incorrect ACPI data, it is able to load and operate the accelerometer.

Fixes the accelerometer failing with:
bmc150_accel i2c-BMA250E:00: Invalid chip f8
on the WinBook TW100

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:bmc150-accel: Move bmc150_accel_chip_init()
Bastien Nocera [Thu, 23 Jul 2015 15:20:59 +0000 (17:20 +0200)]
iio:accel:bmc150-accel: Move bmc150_accel_chip_init()

Move bmc150_accel_chip_init() so that we can use
bmc150_accel_chip_info_tbl[] in it.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agostaging: iio_simple_dummy: Fix indentation errors
Lars Svensson [Wed, 5 Aug 2015 12:15:12 +0000 (14:15 +0200)]
staging: iio_simple_dummy: Fix indentation errors

Fixing indentation errors in
drivers/staging/iio/iio_simple_dummy_events.c.

Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16136: Add ADIS16137 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:21 +0000 (15:38 +0200)]
iio: adis16136: Add ADIS16137 support

The ADIS16137 is register map compatible to the ADIS16136, but has a
different scale factor for the gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16400: Add ADIS16445 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:20 +0000 (15:38 +0200)]
iio: adis16400: Add ADIS16445 support

The ADIS16445 is similar to the ADIS16448, but without the magnetometer and
pressure channels as well as different scale factors for the gyroscope and
accelerometer outputs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16400: Add ADIS16367 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:19 +0000 (15:38 +0200)]
iio: adis16400: Add ADIS16367 support

The ADIS16367 is mostly register compatible to the ADIS16360. The only
difference is the scale factor for the gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16260: Add ADIS16266 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:18 +0000 (15:38 +0200)]
iio: adis16260: Add ADIS16266 support

The ADIS16266 is mostly register compatible to the ADIS16260. The
difference is a different gyroscope scale factor as well not having the
relative angular displacement channel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16400: Add ADIS16305 support
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:17 +0000 (15:38 +0200)]
iio: adis16400: Add ADIS16305 support

The ADIS16305 is fully register map compatible to the ADIS16300.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16400: adis16300 has product ID and serial number
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:16 +0000 (15:38 +0200)]
iio: adis16400: adis16300 has product ID and serial number

The ADIS16300 has the product ID and serial number registers, they are just
not documented. Set the appropriate flags so the driver makes use of them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16480: Fix scale factors
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:15 +0000 (15:38 +0200)]
iio: adis16480: Fix scale factors

The different devices support by the adis16480 driver have slightly
different scales for the gyroscope and accelerometer channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: Add inverse unit conversion macros
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:14 +0000 (15:38 +0200)]
iio: Add inverse unit conversion macros

Add inverse unit conversion macro to convert from standard IIO units to
units that might be used by some devices.

Those are useful in combination with scale factors that are specified as
IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
contain the maximum raw value the sensor will generate and the numerator
the value it maps to in a specific unit. Sometimes datasheets specify those
in different units than the standard IIO units (e.g. degree/s instead of
rad/s) and so we need to do a unit conversion.

From a mathematical point of view it does not make a difference whether we
apply the unit conversion to the numerator or the inverse unit conversion
to the denominator since (x / y) / z = x / (y * z). But as the denominator
is typically a larger value and we are rounding both the numerator and
denominator to integer values using the later method gives us a better
precision (E.g. the relative error is smaller if we round 8000.3 to 8000
rather than rounding 8.3 to 8).

This is where in inverse unit conversion macros will be used.

Marked for stable as used by some upcoming fixes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: adis16400: Fix adis16448 gyroscope scale
Lars-Peter Clausen [Wed, 5 Aug 2015 13:38:13 +0000 (15:38 +0200)]
iio: adis16400: Fix adis16448 gyroscope scale

Use the correct scale for the adis16448 gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: trigger: Add missing fields in kernel docs
Cristina Opriceana [Thu, 6 Aug 2015 11:56:02 +0000 (14:56 +0300)]
iio: trigger: Add missing fields in kernel docs

Fix kernel docs warnings by adding the missing description
for each of the existing function parameters.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: Documentation: Add trigger name attribute ABI documentation
Cristina Opriceana [Thu, 6 Aug 2015 11:17:53 +0000 (14:17 +0300)]
iio: Documentation: Add trigger name attribute ABI documentation

This patch adds an entry in ABI Documentation for the name attribute
issued when a trigger is created.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoDocBook: Add initial documentation for IIO
Daniel Baluta [Tue, 4 Aug 2015 14:20:08 +0000 (17:20 +0300)]
DocBook: Add initial documentation for IIO

This is intended to help developers faster find their way
inside the Industrial I/O core and reduce time spent on IIO
drivers development.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Acked-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio: declare struct to fix warning
Pengyu Ma [Tue, 4 Aug 2015 08:32:18 +0000 (16:32 +0800)]
iio: declare struct to fix warning

When compile iio related driver the following warning shown:

include/linux/iio/trigger.h:35:34: warning: 'struct iio_trigger'
declared inside parameter list
  int (*set_trigger_state)(struct iio_trigger *trig, bool state);

include/linux/iio/trigger.h:38:18: warning: 'struct iio_dev'
declared inside parameter list
           struct iio_dev *indio_dev);

'struct iio_dev' and 'struct iio_trigger' was used before declaration,
forward declaration for these structs to fix warning.

Signed-off-by: Pengyu Ma <pengyu.ma@windriver.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:stk8312: drop local buffer
Hartmut Knaack [Wed, 29 Jul 2015 21:39:40 +0000 (23:39 +0200)]
iio:accel:stk8312: drop local buffer

Drop the local buffer in stk8312_trigger_handler() and use data->buffer
instead for bulk reads.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:stk8312: code style cleanup
Hartmut Knaack [Wed, 29 Jul 2015 21:39:39 +0000 (23:39 +0200)]
iio:accel:stk8312: code style cleanup

Adjust some indentation issues to make checkpatch.pl happy in strict mode.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:stk8312: use appropriate variable types
Hartmut Knaack [Wed, 29 Jul 2015 21:39:38 +0000 (23:39 +0200)]
iio:accel:stk8312: use appropriate variable types

Adapt some variable types to reduce unnecessary casting.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:stk8312: rework macro definitions
Hartmut Knaack [Wed, 29 Jul 2015 21:39:37 +0000 (23:39 +0200)]
iio:accel:stk8312: rework macro definitions

Make use of BIT to describe register bits, GENMASK for consecutive
bitmasks, rename and sort existing definitions, replace magic value with
an expressive definition, drop an unused definition.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoiio:accel:stk8312: improve error handling
Hartmut Knaack [Wed, 29 Jul 2015 21:39:36 +0000 (23:39 +0200)]
iio:accel:stk8312: improve error handling

Improve error handling in the following ways:
  - set return value on error condition to an appropriate error code
  - return error code immediately in case of an error (slightly changes
    code structure)
  - pass up real error code
  - add missing error handling
  - return 0 when error have been caught already
  - put device back in active mode after error occurs

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
8 years agoMerge tag 'arc-v4.2-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupt...
Linus Torvalds [Sat, 8 Aug 2015 01:38:00 +0000 (04:38 +0300)]
Merge tag 'arc-v4.2-rc6-fixes' of git://git./linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "Here's a late pull request for accumulated ARC fixes which came out of
  extended testing of the new ARCv2 port with LTP etc.  llock/scond
  livelock workaround has been reviewed by PeterZ.  The changes look a
  lot but I've crafted them into finer grained patches for better
  tracking later.

  I have some more fixes (ARC Futex backend) ready to go but those will
  have to wait for tglx to return from vacation.

  Summary:
   - Enable a reduced config of HS38 (w/o div-rem, ll64...)
   - Add software workaround for LLOCK/SCOND livelock
   - Fallout of a recent pt_regs update"

* tag 'arc-v4.2-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff
  ARC: Make pt_regs regs unsigned
  ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle
  ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with exponential backoff
  ARC: LLOCK/SCOND based rwlock
  ARC: LLOCK/SCOND based spin_lock
  ARC: refactor atomic inline asm operands with symbolic names
  Revert "ARCv2: STAR 9000837815 workaround hardware exclusive transactions livelock"
  ARCv2: [axs103_smp] Reduce clk for Quad FPGA configs
  ARCv2: Fix the peripheral address space detection
  ARCv2: allow selection of page size for MMUv4
  ARCv2: lib: memset: Don't assume 64-bit load/stores
  ARCv2: lib: memcpy: Missing PREFETCHW
  ARCv2: add knob for DIV_REV in Kconfig
  ARC/time: Migrate to new 'set-state' interface

8 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Sat, 8 Aug 2015 01:36:40 +0000 (04:36 +0300)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost

Pull virtio fix from Michael Tsirkin:
 "A last minute fix for the new virtio input driver.  It seems pretty
   obvious, and the problem it's fixing would be quite hard to debug"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio-input: reset device and detach unused during remove

8 years agoMerge tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
Linus Torvalds [Sat, 8 Aug 2015 01:35:14 +0000 (04:35 +0300)]
Merge tag 'dm-4.2-fixes-4' of git://git./linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:

 - stable fix for a dm_merge_bvec() regression on 32 bit Fedora systems.

 - fix for a 4.2 DM thinp discard regression due to inability to
   properly delete a range of blocks in a data mapping btree.

* tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm btree remove: fix bug in remove_one()
  dm: fix dm_merge_bvec regression on 32 bit systems

8 years agoMerge tag 'sound-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Sat, 8 Aug 2015 01:33:35 +0000 (04:33 +0300)]
Merge tag 'sound-4.2-rc6' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "The only bulk changes in this request is ABI updates for ASoC topology
  API.  It's a new API that was introduced in 4.2, and we'd like to
  avoid ABI change after the release, so it's taken now.  As there is no
  real in-tree user for this API, it should be fairly safe.

  Other than that, the usual small fixes are found in various drivers:
  ASoC cs4265, rt5645, intel-sst, firewire, oxygen and HD-audio"

* tag 'sound-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: topology: Add private data type and bump ABI version to 3
  ASoC: topology: Add ops support to byte controls UAPI
  ASoC: topology: Update TLV support so we can support more TLV types
  ASoC: topology: add private data to manifest
  ASoC: topology: Add subsequence in topology
  ALSA: hda - one Dell machine needs the headphone white noise fixup
  ALSA: fireworks/firewire-lib: add support for recent firmware quirk
  Revert "ALSA: fireworks: add support for AudioFire2 quirk"
  ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()
  ALSA: HDA: Dont check return for snd_hdac_chip_readl
  ALSA: HDA: Fix stream assignment for host in decoupled mode
  ASoC: rt5645: Fix lost pin setting for DMIC1
  ALSA: oxygen: Fix logical-not-parentheses warning
  ASoC: Intel: sst_byt: fix initialize 'NULL device *' issue
  ASoC: Intel: haswell: fix initialize 'NULL device *' issue
  ASoC: cs4265: Fix setting dai format for Left/Right Justified

8 years agoMerge tag 'hwmon-for-linus-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 8 Aug 2015 01:30:37 +0000 (04:30 +0300)]
Merge tag 'hwmon-for-linus-v4.2-rc6' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - Export module alias information in g762 and nct7904 to support
   auto-loading.

 - Blacklist Dell Studio XPS 8100 in dell-smm to fix fan control
   problems.

* tag 'hwmon-for-linus-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (g762) Export OF module alias information
  hwmon: (nct7904) Export I2C module alias information
  hwmon: (dell-smm) Blacklist Dell Studio XPS 8100

8 years agoMerge tag 'usb-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 8 Aug 2015 01:27:51 +0000 (04:27 +0300)]
Merge tag 'usb-4.2-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB and PHY fixes for 4.2-rc6 that resolve some reported
  issues.

  All of these have been in the linux-next tree for a while, full
  details on the patches are in the shortlog below"

* tag 'usb-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  ARM: dts: dra7: Add syscon-pllreset syscon to SATA PHY
  drivers/usb: Delete XHCI command timer if necessary
  xhci: fix off by one error in TRB DMA address boundary check
  usb: udc: core: add device_del() call to error pathway
  phy: ti-pipe3: i783 workaround for SATA lockup after dpll unlock/relock
  phy-sun4i-usb: Add missing EXPORT_SYMBOL_GPL for sun4i_usb_phy_set_squelch_detect
  USB: sierra: add 1199:68AB device ID
  usb: gadget: f_printer: actually limit the number of instances
  usb: gadget: f_hid: actually limit the number of instances
  usb: gadget: f_uac2: fix calculation of uac2->p_interval
  usb: gadget: bdc: fix a driver crash on disconnect
  usb: chipidea: ehci_init_driver is intended to call one time
  USB: qcserial: Add support for Dell Wireless 5809e 4G Modem
  USB: qcserial/option: make AT URCs work for Sierra Wireless MC7305/MC7355

8 years agoMerge tag 'staging-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 8 Aug 2015 01:26:31 +0000 (04:26 +0300)]
Merge tag 'staging-4.2-rc6' of git://git./linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are three bugfixes for some staging driver issues that have been
  reported.  All have been in the linux-next tree for a while"

* tag 'staging-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: lustre: Include unaligned.h instead of access_ok.h
  staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULL
  staging: comedi: das1800: add missing break in switch

8 years agoMerge tag 'char-misc-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 8 Aug 2015 01:25:10 +0000 (04:25 +0300)]
Merge tag 'char-misc-4.2-rc6' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc fixes from Greg KH:
 "Here are some extcon fixes for 4.2-rc6 that resolve some reported
  problems.

  All have been in linux-next for a while"

* tag 'char-misc-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  extcon: Fix extcon_cable_get_state() from getting old state after notification
  extcon: Fix hang and extcon_get/set_cable_state().
  extcon: palmas: Fix NULL pointer error

8 years agoMerge tag 'drm-intel-fixes-2015-08-07' of git://anongit.freedesktop.org/drm-intel
Linus Torvalds [Sat, 8 Aug 2015 01:18:14 +0000 (04:18 +0300)]
Merge tag 'drm-intel-fixes-2015-08-07' of git://anongit.freedesktop.org/drm-intel

Pull drm fixes from Daniel Vetter:
 "One i915 regression fix and a drm core one since Dave's not around,
  both introduced in 4.2 so not cc: stable.

  The fix for the warning Ted reported isn't in here yet since he didn't
  yet supply a tested-by and I can't repro this one myself (it's in
  fixup code that needs firmware doing something i915 wouldn't do)"

* tag 'drm-intel-fixes-2015-08-07' of git://anongit.freedesktop.org/drm-intel:
  drm/vblank: Use u32 consistently for vblank counters
  drm/i915: Allow parsing of variable size child device entries from VBT

8 years agostaging: rtl8188eu: remove multiple blank line
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:34 +0000 (16:06 +0530)]
staging: rtl8188eu: remove multiple blank line

Multiple blank lines is against the kernel coding style and checkpatch
complains for that.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove unused function
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:33 +0000 (16:06 +0530)]
staging: rtl8188eu: remove unused function

The function rtw_init_recvframe() was not being used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove exit label
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:32 +0000 (16:06 +0530)]
staging: rtl8188eu: remove exit label

An exit label which does nothing except return, is not worth having. So
remove it.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove unused define
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:31 +0000 (16:06 +0530)]
staging: rtl8188eu: remove unused define

_RECV_OSDEP_C_ was only defined here but never checked anywhere.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: rearrange code
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:30 +0000 (16:06 +0530)]
staging: rtl8188eu: rearrange code

Re-arrange the code to directly return success or failure, thus removing
the variable used in the function.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: make function void
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:29 +0000 (16:06 +0530)]
staging: rtl8188eu: make function void

The return value of rtw_os_recv_resource_alloc() is never checked, so
make it as void. Moreover as of now the function can not fail.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove unused argument
Sudip Mukherjee [Fri, 7 Aug 2015 10:36:28 +0000 (16:06 +0530)]
staging: rtl8188eu: remove unused argument

The function rtw_os_recv_resource_alloc() only uses the argument
struct recv_frame *. So remove the other unused argument.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove WILC_memcmp function
Chaehyun Lim [Fri, 7 Aug 2015 00:02:04 +0000 (09:02 +0900)]
staging: wilc1000: remove WILC_memcmp function

Remove WILC_memcmp function because it is changed to memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use memcmp instead of WILC_memcmp
Chaehyun Lim [Fri, 7 Aug 2015 00:02:03 +0000 (09:02 +0900)]
staging: wilc1000: use memcmp instead of WILC_memcmp

Use memcmp instead of WILC_memcmp.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove WILC_memset function
Chaehyun Lim [Fri, 7 Aug 2015 00:02:02 +0000 (09:02 +0900)]
staging: wilc1000: remove WILC_memset function

Remove WILC_memset function because it is changed to memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: use memset instead of WILC_memset
Chaehyun Lim [Fri, 7 Aug 2015 00:02:01 +0000 (09:02 +0900)]
staging: wilc1000: use memset instead of WILC_memset

Use memset instead of WILC_memset.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: use kmemdup rather than duplicating its implementation
Andrzej Hajda [Fri, 7 Aug 2015 07:59:25 +0000 (09:59 +0200)]
staging/lustre: use kmemdup rather than duplicating its implementation

The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: change SupportedRates to rates
Joshua Clayton [Thu, 6 Aug 2015 00:17:21 +0000 (17:17 -0700)]
staging: rtl8712: change SupportedRates to rates

Change the value to a name that conforms to Linux coding style.

"rates" is equally expressive in this context, and I have left alone
a comment and function name that describe the rates as supported rates.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: remove typedefs
Joshua Clayton [Thu, 6 Aug 2015 00:17:20 +0000 (17:17 -0700)]
staging: rtl8712: remove typedefs

Coding style fix.
Get rid of typedefs NDIS_802_11_RATES and NDIS_802_11_RATES_EX
Undo any casting that was done as a result of the typedef.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: rename function
Joshua Clayton [Thu, 6 Aug 2015 00:17:19 +0000 (17:17 -0700)]
staging: rtl8712: rename function

Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(),
which corresponds to the struct whose size it measures.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: remove duplicate struct
Joshua Clayton [Thu, 6 Aug 2015 00:17:18 +0000 (17:17 -0700)]
staging: rtl8712: remove duplicate struct

struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex,
and is used about a third as often.

Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex

This also gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: removed unused wrapper structs
Joshua Clayton [Thu, 6 Aug 2015 00:17:17 +0000 (17:17 -0700)]
staging: rtl8712: removed unused wrapper structs

Remove wrapper structs that just wrap struct ndis_wlan_bssid_ex,
and are unused.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: fix comment
Joshua Clayton [Thu, 6 Aug 2015 00:17:16 +0000 (17:17 -0700)]
staging: rtl8712: fix comment

The old comment refers to a typedef name which is being removed,
and to a style of calculation which is no longer being used.
It falsely states that IELength is variable length, instead of IEs.

Change comment to simply state that the IEs field is a buffer of
variable size and that IELength refers to the current size.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: simplify size calculation
Joshua Clayton [Thu, 6 Aug 2015 00:17:15 +0000 (17:17 -0700)]
staging: rtl8712: simplify size calculation

replace item-by-item  size calculation of a struct
with the size of the struct.

This gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: simplify return
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:06 +0000 (17:34 +0530)]
staging: sm750fb: simplify return

Lets return the return value directly instead of using a variable to
store the result.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: rearrange code
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:05 +0000 (17:34 +0530)]
staging: sm750fb: rearrange code

Rearrange the code to remove one exit label which also makes the code
less indented and more readable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: fix multiline comment
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:04 +0000 (17:34 +0530)]
staging: sm750fb: fix multiline comment

Multiline comments are edited to be in the kernel coding style.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: space around operator
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:03 +0000 (17:34 +0530)]
staging: sm750fb: space around operator

Kernel coding style says to have a space around the operators.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: remove multiple blank line
Sudip Mukherjee [Fri, 7 Aug 2015 12:04:02 +0000 (17:34 +0530)]
staging: sm750fb: remove multiple blank line

Multiple blank lines are not kernel coding style and so checkpatch
complains. Remove them.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: fix buggy size calculation
Joshua Clayton [Thu, 6 Aug 2015 00:17:14 +0000 (17:17 -0700)]
staging: rtl8712: fix buggy size calculation

r8712_get_ndis_wlan_bssid_ex_sz has a "6 * sizeof(unsigned long)"
where the underlying struct has a 6 * unsigned char.
Simplify the calculation by just subtracting the variable part from
the size of the struct.

This also gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: lustre: lnet: Remove unnecessary parentheses on return
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:49:57 +0000 (23:49 +0200)]
Staging: lustre: lnet: Remove unnecessary parentheses on return

Removed three instances of parentheses in return calls that are
unnecessary and do not contribute to readability.

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Fix space before '[' error
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:48:48 +0000 (23:48 +0200)]
staging: lustre: Fix space before '[' error

Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Fix space before '(' warnings
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:47:41 +0000 (23:47 +0200)]
staging: lustre: Fix space before '(' warnings

Fix several instances of checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Fix space before '++' error
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:45:50 +0000 (23:45 +0200)]
staging: lustre: Fix space before '++' error

Fix checkpatch.pl error:
ERROR: space prohibited before that '++' (ctx:WxO)

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Fix code indent error
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:44:36 +0000 (23:44 +0200)]
staging: lustre: Fix code indent error

Fix checkpatch.pl error:
ERROR: code indent should use tabs where possible

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: Unnecessary line continuation
Miguel Bernabeu Diaz [Wed, 5 Aug 2015 21:43:08 +0000 (23:43 +0200)]
staging: lustre: Unnecessary line continuation

Fix checkpatch.pl warning:
WARNING: Avoid unnecessary line continuations

Signed-off-by: Miguel Bernabeu Diaz <miguelbernadi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: add DPAA2 overview readme
Stuart Yoder [Fri, 7 Aug 2015 01:09:24 +0000 (20:09 -0500)]
staging: fsl-mc: add DPAA2 overview readme

add README file providing an overview of the DPAA2 architecture
and how it is integrated in Linux

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vme: remove an unnecessary and wrong warning message
Navy Cheng [Thu, 6 Aug 2015 01:47:57 +0000 (09:47 +0800)]
Staging: vme: remove an unnecessary and wrong warning message

The wrong warning message in vme_user_probe() will mislead developers and
users. As the error message which prompt cdev_add() error already exists,
just remove the unnecessary and wrong message.

Signed-off-by: Navy Cheng <navych@126.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>