1. 26 Sep, 2012 34 commits
  2. 25 Sep, 2012 3 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-for-v3.7e' of... · 71c62902
      Greg Kroah-Hartman authored
      Merge tag 'iio-for-v3.7e' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
      
      Fifth round of new drivers and device support for the IIO
      subsystem in the 3.7 cycle.
      
      Here we have a mixed bag of new stuff, minor fixes and
      more major fixes for drivers added earlier in this cycle.
      
      1) A number of fixes for the HID sensors code added in previous
      pull request.  Typical stuff that has become apparent as more eyes
      have looked at the code post merging. Similar case for the ad5755 dac.
      
      2) Cleanups of error handing in inkern.c - again typical stuff to see
      as code comes into heavier use and people notice the naughty short
      cuts that snuck in originally and kindly fix them.
      
      3) A series from Lars that removes some incorrect error handling
      from the remove functions of a number of drivers.  These have been
      there for a very long time hence I'm not pushing these out for the
      3.6 cycle.
      
      4) Support for more parts in the ad7780 driver.
      
      5) A driver for the adcs on the lp8788 power management unit
      
      6) A client driver for IIO to allow it's ADCs to be used for
      battery status measurement.  Note this driver has some dependencies
      on some utility functions added to IIO in this series, hence it is
      coming via this tree rather than Anton's.
      
      7) A null pointer dereference bug in the 'fake' driver. I'm not
      doing this as a fix for the 3.6 cycle because it only effects
      'fake' hardware and that code is typically only used by people
      investigating how IIO works as part of writing new drivers. Hence
      it's hardly a critical fix.
      71c62902
    • Harsh Kumar's avatar
      staging: winbond: Coding Style correction and removal of unused macro · 9970eeae
      Harsh Kumar authored
      
      
      Removed an unused macro. Plus, couple of grammatical and coding style fixes.
      
      1) The macro _INLINE is not used anywhere. Anyways __inline is not portable.
      2) Changed comment from "Not use" to "Unused" make it grammatically correct and
         to fit in 80 word limit.
      3.) Removed space after *
      
      Signed-off-by: default avatarHarsh Kumar <harsh1kumar@gmail.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9970eeae
    • Alexey Khoroshilov's avatar
      staging: sbe-2t3e3: fix error handling in t3e3_init_channel() · 4c229df0
      Alexey Khoroshilov authored
      
      
      t3e3_init_channel() incorrectly handles errors in several places:
      it returns zero and does not deallocate all required resources.
      The patch fixes that places.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c229df0
  3. 22 Sep, 2012 3 commits
    • Lars-Peter Clausen's avatar
      staging:iio:dummy: Fix potential NULL pointer dereference · 3fff2274
      Lars-Peter Clausen authored
      
      
      If the config contains CONFIG_IIO_BUFFER=y and CONFIG_IIO_SIMPLE_DUMMY_BUFFER=n
      iio_simple_dummy_configure_buffer() is stubbed out and iio_buffer_register() is
      not. As a result we try to register a buffer which has not been configured.
      This will causes a NULL pointer deref in iio_buffer_register. To solve this
      issue move the iio_buffer_register() call to iio_simple_dummy_configure_buffer(),
      so it will only be called if iio_simple_dummy_configure_buffer() has been called.
      
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      3fff2274
    • anish kumar's avatar
      power: battery: Generic battery driver using IIO · e60fea79
      anish kumar authored
      
      
      Driver to allow use of the ADC drivers supported by the IIO
      subsystem for battery status monitoring. Connecting this
      driver to the relevant IIO device requires registration of
      the appropriate iio_map structure array by the IIO device
      driver (usually from platform data).  If specified the driver
      will also make use of a gpio to provide interrupt driven
      notification that the battery is fully charged.
      
      In last version:
      Addressed concerns raised by lars:
      a. made the adc_bat per device.
      b. get the IIO channel using hardcoded channel names.
      c. Minor issues related to gpio_is_valid and some code
         refactoring.
      
      In V1:
      Addressed concerns raised by Anton:
      a. changed the struct name to gab(generic adc battery).
      b. Added some functions to neaten the code.
      c. Some minor coding guidelines changes.
      d. Used the latest function introduce by lars:
         iio_read_channel_processed to streamline the code.
      
      In V2:
      Addressed concerns by lars:
      a. No need of allocating memory for channels.Make it array.
      b. Code restructring, coding style and following kernel guidelines changes
         suggested by him.
      
      In V3:
      Addressed conerns by Anton:
      a. Added the copyright.
      b. Coding guidelines changes suggested by him.
      c. Added Makefile and Kconfig
      
      Signed-off-by: default avataranish kumar <anish198519851985@gmail.com>
      Acked-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      e60fea79
    • Axel Lin's avatar
      HID: hid-sensor-hub: Fix sensor_hub_probe error handling · f2f13a68
      Axel Lin authored
      
      
      Fix below issues:
      1. In the case of goto err_close, hid_hw_stop(hdev) is called twice. Fix it.
      2. If fails to allocate MFD device name, we also need to free all
         successfully allocated names in previous iterations.
      3. In sensor_hub_remove(), Call hid_hw_close() before hid_hw_stop().
      4. Adjust unnecessary change lines for hid_err.
      
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      f2f13a68