summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-blinkm.c
AgeCommit message (Collapse)Author
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61Thomas Gleixner
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 <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02leds: blinkm: clean up double assignment to data->i2c_addrColin Ian King
Currently data->i2c_addr is being assigned twice, first with the value 0x09 and then immediately afterwards with the value 0x08. The first assignment is redundant and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2018-01-08leds: blinkm: avoid uninitialized data useArnd Bergmann
gcc-8 reports missing error handling in blinkm_detect, when blinkm() fails, tmpargs[] is uninitialized: drivers/leds/leds-blinkm.c: In function 'blinkm_detect': drivers/leds/leds-blinkm.c:555:6: error: 'tmpargs' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds a missing error checks. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-08-04leds: blinkm: constify attribute_group structures.Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2016-01-04leds: blinkm: Remove work queueAndrew Lunn
Now the core implements the work queue, remove it from the driver, and switch to using brightness_set_blocking op. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Cc: Jan-Simon Moeller <dl9pf@gmx.de> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2014-02-27leds: blinkm: remove unnecessary spacesJingoo Han
Remove unnecessary space in order to fix the following checkpatch issues. WARNING: space prohibited before semicolon Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jan-Simon Möller <dl9pf@gmx.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2014-02-27drivers/leds: delete non-required instances of include <linux/init.h>Paul Gortmaker
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: Bryan Wu <cooloney@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: linux-leds@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-10-22leds: blinkm: Remove redundant breakSachin Kamat
'break' after return is redundant. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Jan-Simon Möller <dl9pf@gmx.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
2012-11-28leds: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28leds: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28leds: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Jan-Simon Moeller <jansimon.moeller@gmx.de> Acked-by: Bryan Wu <cooloney@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-27LEDS: propagate error codes in blinkm_detect()Dan Carpenter
Use the error codes from the lower levels instead of -ENODEV. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jan-Simon Möller <jansimon.moeller@gmx.de> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-07-27LEDS: memory leak in blinkm_led_common_set()Dan Carpenter
This can return without freeing the bl_work struct. Also there was no check for allocation failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jan-Simon Möller <jansimon.moeller@gmx.de> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
2012-07-24LEDS: add BlinkM RGB LED driver, documentation and update MAINTAINERSJan-Simon Möller
Add driver for BlinkM device to drivers/leds/. Add entry to MAINTAINERS file. Add documentation in Documentation/leds/. A BlinkM is a RGB LED controlled through I2C. This driver implements an interface to the LED framework and another sysfs group to access the internal options of the BlinkM. rev6: Use module_i2c_driver(). rev5: Removed own workqueue in favor of events wq. rev4: Fixed comments by Bryan Wu. rev3: Fixed issues found by Jonathan Neuschäfer. (bryan.wu@canonical.com: remove 2 trailing whitespace) Signed-off-by: Jan-Simon Möller <jansimon.moeller@gmx.de> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>