aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/tsl2550.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-14misc: tsl2550: remove redundant initialization to variable rColin Ian King1-7/+5
The variable r is being initialized with a value that is never read and it is being updated later with a new value. Remove the redundant initialization and move the declaration into a deeper code block. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-10misc: tsl2550: simplify getting the adapter of a clientWolfram Sang1-1/+1
We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61Thomas Gleixner1-14/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Michael Ellerman <[email protected]> (powerpc) Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-07-07tsl2550: fix lux1_input error in low lightMatt Ranostay1-1/+1
ADC channel 0 photodiode detects both infrared + visible light, but ADC channel 1 just detects infrared. However, the latter is a bit more sensitive in that range so complete darkness or low light causes a error condition in which the chan0 - chan1 is negative that results in a -EAGAIN. This patch changes the resulting lux1_input sysfs attribute message from "Resource temporarily unavailable" to a user-grokable lux value of 0. Cc: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Matt Ranostay <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-04-08misc: tsl2550: Add OF device ID tableJavier Martinez Canillas1-0/+7
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-07-27misc: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-07drivers/misc: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Cc: Arnd Bergmann <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-05-16Drivers: Misc: tsl2250: fix warnings, unsigned long will never < 0Chen Gang1-2/+2
val is unsigned long which never < 0 Signed-off-by: Chen Gang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: tsl2550: Use dev_pm_opsLars-Peter Clausen1-10/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Rodolfo Giometti <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21misc: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: "Michał Mirosław" <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: Eric Piel <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21misc: remove use of __devinitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: "Michał Mirosław" <[email protected]> Cc: Eric Piel <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-21drivers/misc: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: "Michał Mirosław" <[email protected]> Cc: Wolfram Sang <[email protected]> Cc: Eric Piel <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-01-24MISC: convert drivers/misc/* to use module_i2c_driver()Axel Lin1-12/+1
This patch converts the drivers in drivers/misc/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Cc: Michael Hennerich <[email protected]> Cc: Anantha Narayanan <[email protected]> Cc: Hemanth V <[email protected]> Cc: Christoph Mair <[email protected]> Cc: Grant Likely <[email protected]> Cc: Ben Gardner <[email protected]> Cc: Minkyu Kang <[email protected]> Cc: Kalhan Trisal <[email protected]> Cc: Darrick J. Wong <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Rodolfo Giometti <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-13tsl2550: Move from i2c/chips to miscJean Delvare1-0/+473
Move the last remaining driver from i2c/chips to misc. Good ridance! Signed-off-by: Jean Delvare <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Jonathan Cameron <[email protected]>