<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/leds, branch v5.4.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-09-12T18:45:52Z</updated>
<entry>
<title>leds: lm3532: Fix optional led-max-microamp prop error handling</title>
<updated>2019-09-12T18:45:52Z</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-09-11T18:27:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d4faf3b6b6eb3c8a750b2e6659a5b1ff3dd9e75'/>
<id>urn:sha1:6d4faf3b6b6eb3c8a750b2e6659a5b1ff3dd9e75</id>
<content type='text'>
Fix the error handling for the led-max-microamp property.
Need to check if the property is present and then if it is
retrieve the setting and its max boundary

Reported-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>led: triggers: Fix dereferencing of null pointer</title>
<updated>2019-09-05T20:32:45Z</updated>
<author>
<name>Oleh Kravchenko</name>
<email>oleg@kaa.org.ua</email>
</author>
<published>2019-09-03T21:18:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4016ba85880b252365d11bc7dc899450f2c73ad7'/>
<id>urn:sha1:4016ba85880b252365d11bc7dc899450f2c73ad7</id>
<content type='text'>
Error was detected by PVS-Studio:
V522 Dereferencing of the null pointer 'led_cdev-&gt;trigger' might take place.

Fixes: 2282e125a406 ("leds: triggers: let struct led_trigger::activate() return an error code")
Signed-off-by: Oleh Kravchenko &lt;oleg@kaa.org.ua&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: ti-lmu-common: Move static keyword to the front of declaration</title>
<updated>2019-09-03T18:34:46Z</updated>
<author>
<name>Krzysztof Wilczynski</name>
<email>kw@linux.com</email>
</author>
<published>2019-08-30T18:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ba7eb84f71692d6ece8d5782ab1658fe7f6c0cad'/>
<id>urn:sha1:ba7eb84f71692d6ece8d5782ab1658fe7f6c0cad</id>
<content type='text'>
Move the static keyword to the front of declaration of ramp_table,
and resolve the following compiler warning that can be seen when
building with warnings enabled (W=1):

drivers/leds/leds-ti-lmu-common.c:14:1: warning:
  ‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Krzysztof Wilczynski &lt;kw@linux.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: lm3532: Move static keyword to the front of declarations</title>
<updated>2019-09-03T18:34:39Z</updated>
<author>
<name>Krzysztof Wilczynski</name>
<email>kw@linux.com</email>
</author>
<published>2019-08-30T18:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=536129cc9a26a47ebda5123c992a875d7f81a746'/>
<id>urn:sha1:536129cc9a26a47ebda5123c992a875d7f81a746</id>
<content type='text'>
Move the static keyword to the front of declarations ramp_table,
als_avrg_table and als_imp_table, and resolve the following
compiler warnings that can be seen when building with warnings
enabled (W=1):

drivers/leds/leds-lm3532.c:209:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

drivers/leds/leds-lm3532.c:266:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

drivers/leds/leds-lm3532.c:281:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Krzysztof Wilczynski &lt;kw@linux.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: trigger: gpio: GPIO 0 is valid</title>
<updated>2019-09-01T11:33:30Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2019-08-30T15:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e4210402639f16dfbfa5ba277aeb88fff401cec'/>
<id>urn:sha1:4e4210402639f16dfbfa5ba277aeb88fff401cec</id>
<content type='text'>
Allow all valid GPIOs to be used in the driver.

Fixes: 17354bfe8527 ("leds: Add gpio-led trigger")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: pwm: Use struct_size() helper</title>
<updated>2019-09-01T11:33:29Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-08-30T00:53:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d4b02200ae7cc5886be01c0d7f1d335f4b6966a7'/>
<id>urn:sha1:d4b02200ae7cc5886be01c0d7f1d335f4b6966a7</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct led_pwm_priv {
	...
        struct led_pwm_data leds[0];
};

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

So, replace the following function:

static inline size_t sizeof_pwm_leds_priv(int num_leds)
{
       return sizeof(struct led_pwm_priv) +
                     (sizeof(struct led_pwm_data) * num_leds);
}

with:

struct_size(priv, leds, count)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: is31fl32xx: Use struct_size() helper</title>
<updated>2019-09-01T11:33:29Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-08-30T18:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1669ec78b87c0f04c963a5fc0885505d97468c7a'/>
<id>urn:sha1:1669ec78b87c0f04c963a5fc0885505d97468c7a</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct is31fl32xx_priv {
	...
        struct is31fl32xx_led_data leds[0];
};

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

So, replace the following function:

static inline size_t sizeof_is31fl32xx_priv(int num_leds)
{
       return sizeof(struct is31fl32xx_priv) +
                     (sizeof(struct is31fl32xx_led_data) * num_leds);
}

with:

struct_size(priv, leds, count)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: ti-lmu-common: Fix coccinelle issue in TI LMU</title>
<updated>2019-09-01T11:33:28Z</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-08-28T15:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2637fd436c60c599e0967faee1903cce58c4a7f9'/>
<id>urn:sha1:2637fd436c60c599e0967faee1903cce58c4a7f9</id>
<content type='text'>
Fix the coccinelle issues found in the TI LMU common code

drivers/leds/leds-ti-lmu-common.c:97:20-29: WARNING: Unsigned expression compared with zero: ramp_down &lt; 0
drivers/leds/leds-ti-lmu-common.c:97:5-12: WARNING: Unsigned expression compared with zero: ramp_up &lt; 0

Fixes: 3fce8e1eb994 ("leds: TI LMU: Add common code for TI LMU devices")
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: lm3532: Avoid potentially unpaired regulator calls</title>
<updated>2019-09-01T11:33:27Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-08-27T21:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=070a0eed7580a976b397dce981db9746df714327'/>
<id>urn:sha1:070a0eed7580a976b397dce981db9746df714327</id>
<content type='text'>
We may currently get unpaired regulator calls when configuring the LED
brightness via sysfs in case of regulator calls producing errors. Let's
fix this by maintaining local state for enabled.

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: syscon: Use resource managed variant of device register</title>
<updated>2019-09-01T11:33:27Z</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2019-08-27T13:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=68bfcf6debd72121758d6e0fbf75f506126d7b9a'/>
<id>urn:sha1:68bfcf6debd72121758d6e0fbf75f506126d7b9a</id>
<content type='text'>
We have a MFD driver compiled as module instantiating this driver. When
unloading that module, those LED devices are not removed, which produces
conflicts, when that module is inserted again.

Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
</feed>
