1. 31 Jan, 2017 4 commits
  2. 27 Jan, 2017 16 commits
  3. 25 Jan, 2017 3 commits
  4. 23 Jan, 2017 14 commits
  5. 22 Jan, 2017 3 commits
    • Alison Schofield's avatar
      iio: trigger: free trigger resource correctly · 10e840df
      Alison Schofield authored
      These stand-alone trigger drivers were using iio_trigger_put()
      where they should have been using iio_trigger_free().  The
      iio_trigger_put() adds a module_put which is bad since they
      never did a module_get.
      
      In the sysfs driver, module_get/put's are used as triggers are
      added & removed. This extra module_put() occurs on an error path
      in the probe routine (probably rare).
      
      In the bfin-timer & interrupt trigger drivers, the module resources
      are not explicitly managed, so it's doing a put on something that
      was never get'd.  It occurs on the probe error path and on the
      remove path (not so rare).
      
      Tested with the sysfs trigger driver.
      The bfin & interrupt drivers were build tested & inspected only.
      Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      10e840df
    • Dan Carpenter's avatar
      iio: trigger: clean up viio_trigger_alloc() · 2c99f1a0
      Dan Carpenter authored
      1) Reverse the test for kmalloc() failure so we can pull everything
         back one tab.
      2) Use gotos for unwinding.
      3) Some of the extra line breaks for the 80 character limit are no
         longer needed so we can remove them.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      2c99f1a0
    • Bhumika Goyal's avatar
      iio: adc: constify iio_info structures · 99a22f06
      Bhumika Goyal authored
      Declare iio_info structures as const as they are only stored in
      the info field of a iio_dev structure. This field is of type const,
      so iio_info structures having similar properties can be made const too.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         6944	    792	      0	   7736	   1e38	drivers/iio/adc/ti-ads1015.o
      
      File size after:
         text   data	    bss	    dec	    hex	filename
         7264	    472	      0	   7736	   1e38	drivers/iio/adc/ti-ads1015.o
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      99a22f06