<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/leds/flash, branch linux-6.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>leds: mt6360: Fix memory leak in mt6360_init_isnk_properties()</title>
<updated>2024-08-03T07:00:39+00:00</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-06-10T22:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ea916691a4b00a367ec949b74f3486dc923c789a'/>
<id>ea916691a4b00a367ec949b74f3486dc923c789a</id>
<content type='text'>
commit e41d574b359ccd8d99be65c6f11502efa2b83136 upstream.

The fwnode_for_each_child_node() loop requires manual intervention to
decrement the child refcount in case of an early return.

Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
in the error paths.

Cc: stable@vger.kernel.org
Fixes: 679f8652064b ("leds: Add mt6360 driver")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Link: https://lore.kernel.org/r/20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e41d574b359ccd8d99be65c6f11502efa2b83136 upstream.

The fwnode_for_each_child_node() loop requires manual intervention to
decrement the child refcount in case of an early return.

Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
in the error paths.

Cc: stable@vger.kernel.org
Fixes: 679f8652064b ("leds: Add mt6360 driver")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Link: https://lore.kernel.org/r/20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Test the correct variable in init</title>
<updated>2024-08-03T07:00:04+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-07-04T15:19:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2c370dda0ee7198121b2399fe7e887eed0a4eb25'/>
<id>2c370dda0ee7198121b2399fe7e887eed0a4eb25</id>
<content type='text'>
[ Upstream commit 87e552ad654554be73e62dd43c923bcee215287d ]

This code was passing the incorrect pointer to PTR_ERR_OR_ZERO() so it
always returned success.  It should have been checking the array element
instead of the array itself.

Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/ZoWJS_epjIMCYITg@stanley.mountain
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 87e552ad654554be73e62dd43c923bcee215287d ]

This code was passing the incorrect pointer to PTR_ERR_OR_ZERO() so it
always returned success.  It should have been checking the array element
instead of the array itself.

Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/ZoWJS_epjIMCYITg@stanley.mountain
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: aat1290: Remove unused field 'torch_brightness' from 'struct aat1290_led'</title>
<updated>2024-05-02T17:09:04+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2024-04-28T15:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=678ba7d25467c06850d0d2922108573ea7346a48'/>
<id>678ba7d25467c06850d0d2922108573ea7346a48</id>
<content type='text'>
In 'struct aat1290_led', the 'torch_brightness' field is unused. Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/f7c8c22242544b11e95d9a77d7d0ea17f5a24fd5.1714318454.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 'struct aat1290_led', the 'torch_brightness' field is unused. Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/f7c8c22242544b11e95d9a77d7d0ea17f5a24fd5.1714318454.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: mt6360: Fix the second LED can not enable torch mode by V4L2</title>
<updated>2024-04-12T08:47:17+00:00</updated>
<author>
<name>ChiaEn Wu</name>
<email>chiaen_wu@richtek.com</email>
</author>
<published>2024-04-09T10:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fd05e3698649f253db5476929675a8cd954cb2b8'/>
<id>fd05e3698649f253db5476929675a8cd954cb2b8</id>
<content type='text'>
V4L2 will disable strobe mode of the LED device when enable torch mode,
but this logic will conflict with the "priv-&gt;fled_torch_used"
in "mt6360_strobe_set()". So after enabling torch mode of the first
LED, the second LED will not be able to enable torch mode correctly.

Therefore, at the beginning of "mt6360_strobe_set()", check whether the
state of the upcoming change and the current LED device state are the
same, so as to avoid the above problem.

Signed-off-by: ChiaEn Wu &lt;chiaen_wu@richtek.com&gt;
Link: https://lore.kernel.org/r/28FE6F1712799128000.chiaen_wu@richtek.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
V4L2 will disable strobe mode of the LED device when enable torch mode,
but this logic will conflict with the "priv-&gt;fled_torch_used"
in "mt6360_strobe_set()". So after enabling torch mode of the first
LED, the second LED will not be able to enable torch mode correctly.

Therefore, at the beginning of "mt6360_strobe_set()", check whether the
state of the upcoming change and the current LED device state are the
same, so as to avoid the above problem.

Signed-off-by: ChiaEn Wu &lt;chiaen_wu@richtek.com&gt;
Link: https://lore.kernel.org/r/28FE6F1712799128000.chiaen_wu@richtek.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: lm3601x: Fix struct lm3601_led kernel-doc warnings</title>
<updated>2024-03-07T08:48:15+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-02-29T07:19:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d0c2df0c7b216872d8e8a61fc258b4e3c1f4d1da'/>
<id>d0c2df0c7b216872d8e8a61fc258b4e3c1f4d1da</id>
<content type='text'>
Add a short struct description and remove one extraneous struct field
description to quieten these warnings:

leds-lm3601x.c:73: warning: missing initial short description on line:
 * struct lm3601x_led -
leds-lm3601x.c:100: warning: Excess struct member 'led_name' description in 'lm3601x_led'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240229071931.7870-2-rdunlap@infradead.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a short struct description and remove one extraneous struct field
description to quieten these warnings:

leds-lm3601x.c:73: warning: missing initial short description on line:
 * struct lm3601x_led -
leds-lm3601x.c:100: warning: Excess struct member 'led_name' description in 'lm3601x_led'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Vadim Pasternak &lt;vadimp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20240229071931.7870-2-rdunlap@infradead.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: sgm3140: Add missing timer cleanup and flash gpio control</title>
<updated>2024-03-07T08:48:12+00:00</updated>
<author>
<name>Ondrej Jirman</name>
<email>megi@xff.cz</email>
</author>
<published>2024-02-17T19:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=205c29887a333ee4b37596e6533373e38cb23947'/>
<id>205c29887a333ee4b37596e6533373e38cb23947</id>
<content type='text'>
Enabling strobe and then setting brightness to 0 causes the driver to enter
invalid state after strobe end timer fires. We should cancel strobe mode
resources when changing brightness (aka torch mode).

Fixes: cef8ec8cbd21 ("leds: add sgm3140 driver")
Signed-off-by: Ondrej Jirman &lt;megi@xff.cz&gt;
Link: https://lore.kernel.org/r/20240217191133.1757553-1-megi@xff.cz
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enabling strobe and then setting brightness to 0 causes the driver to enter
invalid state after strobe end timer fires. We should cancel strobe mode
resources when changing brightness (aka torch mode).

Fixes: cef8ec8cbd21 ("leds: add sgm3140 driver")
Signed-off-by: Ondrej Jirman &lt;megi@xff.cz&gt;
Link: https://lore.kernel.org/r/20240217191133.1757553-1-megi@xff.cz
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Make flash and multicolor dependencies unconditional</title>
<updated>2024-03-07T08:48:03+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-01-09T09:06:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=09e3f3244e8480d53873bb86a3808edaa3f4e314'/>
<id>09e3f3244e8480d53873bb86a3808edaa3f4e314</id>
<content type='text'>
Along the same lines as making devm_led_classdev_register() declared
extern unconditional, do the same thing for the two sub-classes
that have similar stubs.

The users of these interfaces go to great lengths to allow building
with both the generic leds API and the extended version, but realistically
there is not much use in this, so just simplify it to always rely
on it and remove the confusing fallback logic.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240109090715.982332-2-arnd@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Along the same lines as making devm_led_classdev_register() declared
extern unconditional, do the same thing for the two sub-classes
that have similar stubs.

The users of these interfaces go to great lengths to allow building
with both the generic leds API and the extended version, but realistically
there is not much use in this, so just simplify it to always rely
on it and remove the confusing fallback logic.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240109090715.982332-2-arnd@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: ktd2692: Add GPIOLIB dependency</title>
<updated>2024-03-07T08:45:24+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-13T16:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d48ece99f2d90be333dad38cba0dc6fadc7dff8c'/>
<id>d48ece99f2d90be333dad38cba0dc6fadc7dff8c</id>
<content type='text'>
The expresswire module requires gpiolib, so anything selecting it
also needs this dependency:

WARNING: unmet direct dependencies detected for LEDS_EXPRESSWIRE
  Depends on [n]: NEW_LEDS [=y] &amp;&amp; GPIOLIB [=n]
  Selected by [y]:
  - LEDS_KTD2692 [=y] &amp;&amp; NEW_LEDS [=y] &amp;&amp; LEDS_CLASS_FLASH [=y] &amp;&amp; OF [=y]

Fixes: e59a15af7aa6 ("leds: ktd2692: Convert to use ExpressWire library")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Link: https://lore.kernel.org/r/20240213165602.2230970-1-arnd@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The expresswire module requires gpiolib, so anything selecting it
also needs this dependency:

WARNING: unmet direct dependencies detected for LEDS_EXPRESSWIRE
  Depends on [n]: NEW_LEDS [=y] &amp;&amp; GPIOLIB [=n]
  Selected by [y]:
  - LEDS_KTD2692 [=y] &amp;&amp; NEW_LEDS [=y] &amp;&amp; LEDS_CLASS_FLASH [=y] &amp;&amp; OF [=y]

Fixes: e59a15af7aa6 ("leds: ktd2692: Convert to use ExpressWire library")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Link: https://lore.kernel.org/r/20240213165602.2230970-1-arnd@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: ktd2692: Convert to use ExpressWire library</title>
<updated>2024-03-07T08:45:08+00:00</updated>
<author>
<name>Duje Mihanović</name>
<email>duje.mihanovic@skole.hr</email>
</author>
<published>2024-01-25T15:30:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b5a8c50e5c1896b913c289e09f98b539fd1740ac'/>
<id>b5a8c50e5c1896b913c289e09f98b539fd1740ac</id>
<content type='text'>
The KTD2692 uses the ExpressWire protocol implemented in the newly
introduced ExpressWire library. Convert the driver to use the library.

Suggested-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Duje Mihanović &lt;duje.mihanovic@skole.hr&gt;
Link: https://lore.kernel.org/r/20240125-ktd2801-v5-2-e22da232a825@skole.hr
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The KTD2692 uses the ExpressWire protocol implemented in the newly
introduced ExpressWire library. Convert the driver to use the library.

Suggested-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Duje Mihanović &lt;duje.mihanovic@skole.hr&gt;
Link: https://lore.kernel.org/r/20240125-ktd2801-v5-2-e22da232a825@skole.hr
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: lm3601x: Convert to use maple tree register cache</title>
<updated>2023-11-01T11:29:00+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2023-09-29T15:23:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8e31906c75bcb8d36b51992fea318c879f2ae82b'/>
<id>8e31906c75bcb8d36b51992fea318c879f2ae82b</id>
<content type='text'>
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230929-leds-maple-v1-1-ba5f9dcb1e75@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230929-leds-maple-v1-1-ba5f9dcb1e75@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
