summaryrefslogtreecommitdiffstats
path: root/drivers/leds
AgeCommit message (Collapse)AuthorFilesLines
2020-11-25leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTIMarek Behún1-2/+2
LED core does not allow LED_COLOR_ID_MULTI for now and instead for RGB LEDs prefers LED_COLOR_ID_RGB. Signed-off-by: Marek Behún <kabel@kernel.org> Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now") Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-11-25leds: turris-omnia: fix checkpatch warningMarek Behún1-2/+2
Use kstrtoul instead of sscanf to satisfy checkpatch. Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-11-25leds: turris-omnia: wrap to 80 columnsMarek Behún1-19/+24
Although checkpatch changed the max-line-length default to 100 columns, we still prefer 80 columns somewhere. Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-11-25leds: turris-omnia: use constants instead of macros for color commandMarek Behún1-21/+13
Use integer constants directly when building I2C messages for LED color change command, instead of macros. The command is simple enough to understand what is going on even without these names. Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-11-25leds: lp50xx: Fix an error handling path in 'lp50xx_probe_dt()'Christophe JAILLET1-2/+4
In case of memory allocation failure, we must release some resources as done in all other error handling paths of the function. 'goto child_out' instead of a direct return so that 'fwnode_handle_put()' is called when we break out of a 'device_for_each_child_node' loop. Fixes: 242b81170fb8 ("leds: lp50xx: Add the LP50XX family of the RGB LED driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-11-25leds: netxbig: add missing put_device() call in netxbig_leds_get_of_pdata()Yu Kuai1-11/+24
if of_find_device_by_node() succeed, netxbig_leds_get_of_pdata() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 2976b1798909 ("leds: netxbig: add device tree binding") Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-10-07leds: pwm: Remove platform_data supportAlexander Dahl1-25/+5
Since commit 141f15c66d94 ("leds: pwm: remove header") that platform interface is not usable from outside and there seems to be no in tree user anymore. All in-tree users of the leds-pwm driver seem to use DT currently. Getting rid of the old platform interface allows the leds-pwm driver to switch over from 'devm_led_classdev_register()' to 'devm_led_classdev_register_ext()'. Signed-off-by: Alexander Dahl <post@lespocky.de> Cc: Denis Osterland-Heim <denis.osterland@diehl.com> Reviewed-by: Marek Behún <marek.behun@nic.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-10-05leds: lm3697: Fix out-of-bound accessGabriel David1-3/+5
If both LED banks aren't used in device tree, an out-of-bounds condition in lm3697_init occurs because of the for loop assuming that all the banks are used. Fix it by adding a variable that contains the number of used banks. Signed-off-by: Gabriel David <ultracoolguy@tutanota.com> [removed extra rename, minor tweaks] Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: stable@kernel.org
2020-09-30leds: ns2: do not guard OF match pointer with of_match_ptrMarek Behún1-7/+7
Do not match OF match pointer with of_match_ptr, so that even if CONFIG_OF is disabled, the driver can still be bound via another method. Move definition of of_ns2_leds_match just before ns2_led_driver definition, since it is not needed sooner. Signed-off-by: Marek Behún <kabel@kernel.org> Tested-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: ns2: convert to fwnode APIMarek Behún1-29/+26
Convert from OF api to fwnode API, so that it is possible to bind this driver without device-tree. The fwnode API does not expose a function to read a specific element of an array. We therefore change the types of the ns2_led_modval structure so that we can read the whole modval array with one fwnode call. Signed-off-by: Marek Behún <kabel@kernel.org> Tested-by: Simon Guinot <simon.guinot@sequanux.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tlc591xx: fix leak of device node iteratorTobias Jordan1-1/+3
In one of the error paths of the for_each_child_of_node loop in tlc591xx_probe, add missing call to of_node_put. Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API") Signed-off-by: Tobias Jordan <kernel@cdqe.de> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: use struct led_init_data when registeringMarek Behún1-13/+12
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Previously if the `label` DT property was not present, the code composed name for the LED in the form "pca963x:%d:%.2x:%u" For backwards compatibility we therefore set init_data->default_label to this value so that the LED will not get a different name if `label` property is not present, nor are `color` and `function`. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: register LEDs immediately after parsing, get rid of platdataMarek Behún1-117/+71
Register LEDs immediately after parsing their properties. This allows us to get rid of platdata, and since no one in tree uses header linux/platform_data/leds-pca963x.h, remove it. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: remove binding commentMarek Behún1-17/+0
Remove the binding comment at the beginning. The information for platdata is now obsolete and DT binding is documented in device-tree bindings. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: NeilBrown <neilb@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: cosmetic change: use helper variableMarek Behún1-17/+16
Use helper variable dev instead of always writing &client->dev. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: NeilBrown <neilb@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: do not set GPIO namesMarek Behún1-3/+0
Do not set GPIO names. Let gpiolib determine GPIO names from the DT property `gpio-line-names`. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: NeilBrown <neilb@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30ledtrig-cpu: Limit to 8 CPUsPavel Machek1-3/+10
Some machines have thousands of CPUs... and trigger mechanisms was not really meant for thousands of triggers. I doubt anyone uses this trigger on many-CPU machine; but if they do, they'll need to do it properly. Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: TODO: Add documentation about possible subsystem improvementsPavel Machek1-0/+75
Help welcome :-). Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca9532: read pwm settings from device treeMarkus Moll1-0/+5
While the two pca9532 pwms can be configured in the platform data struct, there was no corresponding dt binding. Users need to configure the pwm if some leds should blink or continue blinking during boot. Signed-off-by: Markus Moll <mmoll@de.pepperl-fuchs.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca9532: correct shift computation in pca9532_getledMarkus Moll1-3/+5
Each led setting occupies two bits in a corresponding led register. Accessing these bits requires shifting and masking, which was implemented incorrectly in pca9532_getled. Two new helper macros concentrate the computation of those masks in one place. Signed-off-by: Markus Moll <mmoll@de.pepperl-fuchs.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: lm36274: Fix warning for undefined parametersDan Murphy1-2/+3
Fix warnings for undefined parameters when building with W=1. Signed-off-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: lm3532: Fix warnings for undefined parametersDan Murphy1-25/+25
Fix warnings for undefined parameters when W=1 is used. Signed-off-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: use flexible arrayMarek Behún1-16/+12
Instead of doing two allocations, allocate only once, by utilizing flexible array members. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: cosmetic: rename variablesMarek Behún1-51/+53
Rename variable of type struct pca963x_led from pca963x to simple led. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: cosmetic: rename variablesMarek Behún1-27/+28
Rename variables chip and pca963x_chip to chipdef and chip, respectively, so that their names correspond to the names of their types. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: use devres LED registering functionMarek Behún1-20/+2
By using devres version of LED registering function we can remove the .remove method from this driver. The probe method also gets simpler. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: pca963x: cosmetic: use helper variables, better indentationMarek Behún1-68/+71
Use helper variables: instead of writing &client->dev at many places, write only dev. The same with pca963x->chip->chipdef, pca963x->chip->client). Use helper variable u8 val for i2c_smbus_write_byte_data, for better indentation. Indent better on various places. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Peter Meerwald <p.meerwald@bct-electronic.com> Cc: Ricardo Ribalda <ribalda@kernel.org> Cc: Zahari Petkov <zahari@balena.io> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: fix potential zero passed to ERR_PTRMarek Behún1-1/+1
Fix potential ERR_PTR(0). Signed-off-by: Marek Behún <kabel@kernel.org> Fixes: d78b10f5713d9 ("leds: tca6507: use fwnode API instead of OF") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: fix warning triggered by fwnode conversion.Pavel Machek1-1/+1
Robot complains about: All warnings (new ones prefixed by >>): >> drivers/leds/leds-tca6507.c:750:34: warning: unused variable 'of_tca6507_leds_match' [-Wunused-const-variable] static const struct of_device_id of_tca6507_leds_match[] = { Fix it. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: use fwnode API instead of OFMarek Behún1-37/+29
Convert to use fwnode API instead of OF. It is more generic and if someone wants to use this driver without device-tree yet still, they will be able to via swnode fwnodes. Remove the gpio setup function from platdata. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: NeilBrown <neilb@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-30leds: tca6507: Absorb platform dataMarek Behún1-1/+10
The only in-tree usage of this driver is via device-tree. No on else includes linux/leds-tca6507.h, so absorb the definition of platdata structure. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: NeilBrown <neilb@suse.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: parse linux,default-trigger DT property in LED coreMarek Behún24-72/+5
Do the parsing of `linux,default-trigger` DT property to LED core. Currently it is done in many different drivers and the code is repeated. This patch removes the parsing from 23 drivers: an30259a, aw2013, bcm6328, bcm6358, cr0014114, el15203000, gpio, is31fl32xx, lm3532, lm36274, lm3692x, lm3697, lp50xx, lp8860, lt3593, max77650, mt6323, ns2, pm8058, pwm, syscon, tlc591xx and turris-omnia. There is one driver in drivers/input which parses this property on it's own. I shall send a separate patch there after this is applied. There are still 8 drivers that parse this property on their own because they do not pass the led_init_data structure to the registering function. I will try to refactor those in the future. Signed-off-by: Marek Behún <marek.behun@nic.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: syscon: use struct led_init_data when registeringMarek Behún1-3/+4
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm3532: don't parse label DT propertyMarek Behún1-12/+0
This driver uses extended LED registration, so we do not need to parse the `label` DT property on our own. Signed-off-by: Marek Behún <marek.behun@nic.cz> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm36274: use devres LED registering functionMarek Behún1-11/+2
Now that the potential use-after-free issue is resolved we can use devres for LED registration in this driver. By using devres version of LED registering function we can remove the .remove method from this driver. Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm36274: use platform device as parent of LEDMarek Behún1-2/+2
Instead of registering LED under the MFD device, this driver sets the parent of the LED it is registering to the parent of the MFD device (the I2C client device). Because of this we cannot use devres for LED registration, since it can result in use-after-free, see commit a0972fff0947 ("leds: lm36274: fix use-after-free on unbind"). The only other in-tree driver that also registers under the MFD device (drivers/regulator/lm363x-regulator.c) sets the parent to the MFD device. Set the parent of this LED to the MFD device, instead of the I2C client device. Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm36274: do not set chip settings in DT parsing functionMarek Behún1-8/+8
These settings are not parsed from DT and therefore semantically should not be set in function with a name lm36274_parse_dt. Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm36274: use struct led_init_data when registeringMarek Behún1-17/+25
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Previously if the `label` DT property was not present, the code composed name for the LED in the form "parent_name::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present, nor are `color` and `function`. Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm36274: don't iterate through children since there is only oneMarek Behún1-27/+23
Do not use device_for_each_child_node. Since this driver works only with once child node present, use device_get_next_child_node instead. This also saves one level of indentation. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Dan Murphy <dmurphy@ti.com> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: lm36274: cosmetic: rename lm36274_data to chipMarek Behún1-42/+40
Rename this variable so that it is easier to read and easier to write in 80 columns. Also rename variable of this type in lm36274_brightness_set from led to chip, to be consistent. Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: Add driver for Acer Iconia Tab A500Dmitry Osipenko3-0/+137
Acer Iconia Tab A500 is an Android tablet device which has two LEDs embedded into the Power Button. Orange LED indicates "battery charging" status and white LED indicates "wake-up/charge-done" status. The new LED driver provides control over both LEDs to userspace. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: pca9532 - simplify the return expression of pca9532_removeLiu Shixin1-6/+1
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: use struct led_init_data when registeringMarek Behún1-5/+4
By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: remove unneeded variableMarek Behún1-5/+2
No need to use variable found, we can determine whether the mode was found by comparing iterator variable to its limit. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: register LED immediately after parsing DT propertiesMarek Behún1-103/+40
Register each LED immediately after parsing OF properties. This simplifies the driver. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: cosmetic change: use helper variableMarek Behún1-8/+7
Use helper variable dev instead of always writing &pdev->dev. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: cosmetic changeMarek Behún1-4/+2
Return directly instead of setting result and breaking. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: cosmetic variable renameMarek Behún1-56/+47
Rename variable led_dat to led in various functions. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: cosmetic structure renameMarek Behún1-17/+17
Rename structures: ns2_led -> ns2_led_of_one ns2_led_data -> ns2_led. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2020-09-26leds: ns2: use devres API for getting GPIO descriptorsMarek Behún1-4/+4
This drivers leaks GPIO descriptors on driver removal. Use devres API function devm_gpiod_get_from_of_node instead of gpiod_get_from_of_node to avoid this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Simon Guinot <simon.guinot@sequanux.org> Cc: Simon Guinot <sguinot@lacie.com> Cc: Vincent Donnefort <vdonnefort@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Linus Walleij <linus.walleij@linaro.org> Not-for-stable Signed-off-by: Pavel Machek <pavel@ucw.cz>