summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/light
AgeCommit message (Collapse)Author
2016-02-15Staging: iio: light: remove exceptional & on function nameBhumika Goyal
In this file,function names are otherwise used as pointers without &. Found using coccinelle. // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15Staging: iio: light: remove exceptional & on function nameBhumika Goyal
In this file,function names are otherwise used as pointers without &. Found using coccinelle. // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-10staging: iio: Remove parantheses around right hand side of assignmentJanani Ravichandran
Remove parantheses on the right hand side of assignments as they are not needed. Coccinelle patch used: @@ expression a, b, c, d; @@ ( a = (c == d) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-02Staging: iio: light: tsl2x7x_core: use dev_get_platdata()Nizam Haider
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Nizam Haider <nijamh@cdac.in> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-10-27staging: iio: Remove unused variableCristina Moraru
Remove variable that is initialized but not used. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: iio: light: Remove explicit comparisonsCristina Moraru
Remove comparisons to 0 or NULL Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17Staging: iio: tsl2x7x_core: Remove unrequired parentheses from DIV_ROUND_UPShivani Bhardwaj
Remove parentheses surrounding the first argument of the macro DIV_ROUND_UP as they are not required. Semantic patch used: @@ expression e1,e2; @@ DIV_ROUND_UP( - ( e1 - ) ,e2) Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: iio: light: use devm_iio_device_register instead iio_device_registerIoana Ciornei
Replace iio_device_register with resource managed devm_iio_device_register in order to ease the error path. Also delete the remove function since there is no need after this change. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-11staging: iio: Drop owner assignment from i2c_driverKrzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-07staging:iio:light: Add some missing brackets to make sure code works as ↵Jonathan Cameron
intended. Note this is not a bug due to the fact the region cannot be reached without the sanity check passing. The autobuilder reported it as missaligned code which is kind of true as well. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Roberta Dobrescu <roberta.dobrescu@gmail.com>
2015-04-30staging: iio: light: isl29018: Use standard sysfs attributes for scale and ↵Roberta Dobrescu
integration time This patch refactors the isl29018 driver code in order to use standard sysfs attributes for scale and integration time. ISL29018 light sensor uses four ranges and four ADC's resolutions which influence the calculated lux. Adc resolution is strongly connected to integration time and range should be controlled by scale. This patch introduces the usage of integration time and scale instead of adc resolution and range. Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-04-26staging: iio: light: isl29018: Rename lux_scale to calibscaleRoberta Dobrescu
This patch renames lux_scale to calibscale and lux_uscale to ucalibscale. This is done in order to avoid confusion since these parameters are used for hardware applied calibration. Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-04-26staging: iio: light: isl29018: Remove non-standard sysfs attributesRoberta Dobrescu
This patch removes non-standard sysfs attributes range, range_available, adc_resolution and adc_resolution_available. It also removes the corresponding show and store functions. This is in preparation for using standard IIO attributes in order to move the code out of staging. Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-16Staging: iio: Remove parentheses around right side an assignmentHaneen Mohammed
Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurenses. Issue was detected and solved using the following coccinelle script: @rule1@ identifier x, y, z; expression E1, E2; @@ ( x = (y == z); | x = (E1 == E2); | x = -( ... -) ; ) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: iio: clean dev_err loggingHaneen Mohammed
This patch removes __func__ from dev_err. dev_err includes information about: (devcice, driver, specific instance of device, etc) in the log printout. This was done using Coccinelle, with the following semantic patch: @a@ expression E, R; expression msg; @@ dev_err(E, msg, __func__, R); @script:python b@ e << a.msg; y; @@ if(e.find("%s: ") == True): m = e.replace("%s: ", "", 1); coccinelle.y = m; elif(e.find("%s ") == True): m = e.replace("%s ", "", 1); coccinelle.y = m; elif(e.find("%s:") == True): m = e.replace("%s:", "", 1); coccinelle.y = m; else: m = e.replace("%s", "",1); coccinelle.y = m; @c@ expression a.E, a.msg, a.R; identifier b.y; @@ - dev_err(E, msg, __func__, R); + dev_err(E, y, R); Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-02staging: iio: light: remove unused variableAya Mahfouz
This patch removes a variable that was simply used to store the return value of a function call before returning it. The issue was detected and resolved using the following coccinelle script: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-17staging: iio: isl29028: deprecate use of isl in compatible string for isilArnaud Ebalard
"isil" and "isl" prefixes are used at various locations inside the kernel to reference Intersil corporation. This patch is part of a series fixing those locations were "isl" is used in compatible strings to use the now expected "isil" prefix instead (NASDAQ symbol for Intersil and most used version). The old compatible string is kept for backward compatibility. Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Uwe Kleine-Knig <uwe@kleine-koenig.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Peter Huewe <peter.huewe@infineon.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Mark Brown <broonie@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Darshana Padmadas <darshanapadmadas@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Landley <rob@landley.net> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Cc: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-01-25staging: iio: tsl2x7x_core: fix format string warningsAsaf Vertz
Fixed the following warnings (reported by cppcheck): [drivers/staging/iio/light/tsl2x7x_core.c:1150]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/staging/iio/light/tsl2x7x_core.c:1150]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [drivers/staging/iio/light/tsl2x7x_core.c:1150]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-25staging: iio: tsl2583: fix format string warningsAsaf Vertz
Fixed the following warnings (reported by cppcheck): [drivers/staging/iio/light/tsl2583.c:695]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/staging/iio/light/tsl2583.c:695]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [drivers/staging/iio/light/tsl2583.c:695]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-12-16Merge tag 'staging-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here's the big staging tree pull request for 3.19-rc1. We continued to delete more lines than were added, always a good thing, but not at a huge rate this release, only about 70k lines removed overall mostly from removing the horrid bcm driver. Lots of normal staging driver cleanups and fixes all over the place, well over a thousand of them, the shortlog shows all the horrid details. The "contentious" thing here is the movement of the Android binder code out of staging into the "real" part of the kernel. This is code that has been stable for a few years now and is working as-is in the tens of millions of devices with no issues. Yes, the code is horrid, and the userspace api leaves a lot to be desired, but it's not going to change due to legacy issues that we have no control over. Because so many devices and companies rely on this, and the code is stable, might as well promote it out of staging. This was all discussed at the Linux Plumbers conference, and everyone participating agreed that this was the best way forward. There is work happening to replace the binder code with something new that is happening right now, but I don't expect to see the results of that work for another year at the earliest. If that ever happens, and Android switches over to it, I'll gladly remove this version. As for maintainers, I'll be glad to maintain this code, I've been doing it for the past few years with no problems. I'll send a MAINTAINERS entry for it before 3.19-final is out, still need to talk to the Google developers about if they are willing to help with it or not, last I checked they were, which was good. All of these patches have been in linux-next for a while with no reported issues" * tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits) Staging: slicoss: Fix long line issues in slicoss.c staging: rtl8712: remove unnecessary else after return staging: comedi: change some printk calls to pr_err staging: rtl8723au: hal: Removed the extra semicolon lustre: Deletion of unnecessary checks before three function calls staging: lustre: fix sparse warnings: static function declaration staging: lustre: fixed sparse warnings related to static declarations staging: unisys: remove duplicate header staging: unisys: remove unneeded structure staging: ft1000 : replace __attribute ((__packed__) with __packed drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c" Drivers:staging:rtl8192e: Fixed checkpatch warning Drivers:staging:clocking-wizard: Added a newline staging: clocking-wizard: check for a valid clk_name pointer staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1() staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB() staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation ...
2014-11-20Staging: iio: light: Added correct vendor-prefix for device isl29028Darshana Padmadas
This patch adds the correct vendor-prefix for device isl29028 and maintains deprecated vendor-prefix found by checkpatch warning for older kernel releases. Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-10-28Staging: iio: light: Removed unnecessary parenthesesTina Johnson
Unnecessary parentheses around the right hand side of an assignment is removed using the following semantic patch: @@ identifier x,f; constant C; @@ ( -x = (f / C ); +x = f / C ; | -x = (f % C ); +x = f % C ; ) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: iio: light: Remove unnecessary line continuationsRoberta Dobrescu
This fixes the following checkpatch.pl warning: WARNING: Avoid unnecessary line continuations Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-29staging: iio: light: Add a blank line after declarationsRoberta Dobrescu
This fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-29staging: iio: light: Remove space before function pointer argumentsRoberta Dobrescu
This fixes the following checkpatch.pl warning: WARNING: Unnecessary space before function pointer arguments Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-29staging: iio: light: Fix quoted string split across linesRoberta Dobrescu
This fixes the following checkpatch.pl warning: WARNING: quoted string split across lines Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-29Staging: iio: light: Missing a blank line after declarationsAybuke Ozdemir
This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: iio: light: Use usleep_range instead of msleepVaishali Thakkar
This patch fixes following checkpatch.pl warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-13staging: iio: light: isl29018: add ACPI supportLaurentiu Palcu
Add support for enumerating the device through ACPI. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30staging: iio: light: isl29018: add support for isl29023 and isl29035Laurentiu Palcu
Intersil chips ISL29018, ISL29023 and ISL29035 are very similar. They're all ambience light sensors. The ISL29018, however, is also a proximity sensor. The registers are similar too: -------------+----------+---------- AVAILABLE IN | ADDR REG | NAME 290xx | | -------------+----------+---------- 18/23/35| 00h| COMMANDI 18/23/35| 01h| COMMANDII (B4-7 are used only in 29018 for proximity) 18/23/35| 02h| DATALSB 18/23/35| 03h| DATAMSB 18/23/35| 04h| INT_LT_LSB 18/23/35| 05h| INT_LT_MSB 18/23/35| 06h| INT_HT_LSB 18/23/35| 07h| INT_HT_MSB 18/23| 08h| TEST 35| 0Fh| ID -------------+----------+----------- So, this patch will add support for ISL29023 and ISL29035 to the existing isl29018 driver. Since these 2 chips don't have proximity detection, the proximity sysfs attribute is not needed. Also, for ISL29035, since it has an ID register, make use of it in order to properly detect the chip and clear the brownout bit. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30staging: iio: light: isl29018: fix typoLaurentiu Palcu
isl29108 was used, instead of isl29018. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-02staging: iio: isl29018: fix sparse warning regarding incorrect type ↵Teodora Baluta
(different signedness) Fix the following sparse warning: drivers/staging/iio/light/isl29018.c:508:50: warning: incorrect type in argument 3 (different signedness) drivers/staging/iio/light/isl29018.c:508:50: expected unsigned int *conf_adc_bit drivers/staging/iio/light/isl29018.c:508:50: got int *<noident> Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-18Merge tag 'iio-fixes-for-3.16a' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes for the 3.16 cycle. A mixed bag of fixes, many of which feel just to late for 3.15. * hid sensors - some devices need a feature report request in order to change power state. This isn't part of the spec, but has been observed on several devices and does no harm to others. * mpl3115 has had two errors in the buffer description fixed. The presure is signed, not unsigned and the temperature has 12 bits rather than 16. These could lead to incorrect interpretation of the data in userspace. * tsl2x7x - the high byte of the proximity thresholds should be written along with the low byte (which was). This could lead to interesting results with large thresholds. * twl4030 - a flag to specify processed values were required was not set when initializing a reading. As such values returned were in an unknown state. Fixed by simply initializing it appropriately. * IIO_SIMPLE_DUMMY_BUFFER did not select IIO_BUFFER leading to randconfig build errors. * ak8975 was applying an unwanted le16_to_cpu conversion as the i2c framework already performs one. As such for big endian systems, the bytes would be in the wrong order in the magnetic field measurements reported. * mxs-lradc - the controllable voltage dividers were not enabled / disabled for later channels than the first one during conversion. * at91_adc error handling returned -ENOMEM in a u8. Return value of at91_adc_get_trigger_value_by_name changed to int thus allowing -ENOMEM and also original values to be returned. * mcb - mcb_request_mem returns and ERR_PTR but the caller was checking for NULL to detect an error.
2014-06-02staging: iio: tsl2x7x_core: fix proximity tresholdMario Schuknecht
Consider high byte of proximity min and max treshold in function 'tsl2x7x_chip_on'. So far, the high byte was not set. Cc: Stable@vger.kernel.org Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-04-14Staging: iio: Switch from msleep to usleep range per timers-howto.txtMichael Welling
Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14Staging: iio: Remove quoted string split across lines warningsMichael Welling
Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14Staging: iio: Removes unwanted space before semicolonMichael Welling
Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: iio: light: Checkpatch fixes tsl2x7x_core.cAybuke Ozdemir
This patch fixes these errors and warning messages found by checkpatch.pl: ERROR: return is not a function, parentheses are not required. WARNING: space prohibited before semicolon. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18Staging: iio/light: Fix return values in tsl2583.cMonam Agarwal
This patch fixes following smatch warnings: /drivers/staging/iio/light/tsl2583.c:436 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? /drivers/staging/iio/light/tsl2583.c:448 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? /drivers/staging/iio/light/tsl2583.c:461 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08iio: Remove support for the legacy event config interfaceLars-Peter Clausen
Now that all drivers have been converted to the new event config interface we can remove for the legacy event config interface. Also drop the '_new' suffix for the event config interface callbacks, since those are the only callbacks now. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-11-24staging: iio: isl29018: Use devm_iio_device_registerSachin Kamat
devm_iio_device_register simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12staging:iio:tsl2x7x: Switch to new event config interfaceLars-Peter Clausen
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-09-25Merge 3.12-rc2 into staging-next.Greg Kroah-Hartman
This resolves the merge problem with two iio drivers that Stephen Rothwell pointed out. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-18iio: isl29018: Fix uninitialized valueDerek Basehore
The lux_uscale value is not initialized at probe. The value will be uninitialized unless a value is written to it through the iio channel interface. This fixes that. Signed-off-by: Derek Basehore <dbasehore@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65998 Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-14staging: iio: tsl2x7x_core: Remove redundant breakSachin Kamat
'break' after return is redundant. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-08staging: iio: replace strict_strto*() with kstrto*()Jingoo Han
The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Previously, there were only strict_strtol(), strict_strtoul(), strict_strtoull(), and strict_strtoll(). Thus, when converting to the variables, only long, unsigned long, unsigned long long, and long long can be used. However, kstrto*() provides various functions handling all types of variables. Therefore, the types of variables can be changed properly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-07staging: iio: tsl2x7x_core: Fix sparse warningSachin Kamat
Silences the following warning: drivers/staging/iio/light/tsl2x7x_core.c:553:70: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: J. August Brenner <jbrenner@taosinc.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-07staging: iio: tsl2x7x_core: Use devm_* APIsSachin Kamat
devm_* APIs are device managed and make code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: J. August Brenner <jbrenner@taosinc.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-07staging: iio: tsl2583: Use devm_iio_device_allocSachin Kamat
devm_iio_device_alloc makes the code simple. While at it also fixed an uninitialized return with -EINVAL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: J. August Brenner <jbrenner@taosinc.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03staging: iio: light: isl29028: Use devm_iio_device_allocSachin Kamat
Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>