* leds/leds-pca9532.c: sleeping function called in .brightness_set()
@ 2008-11-24 9:51 Guennadi Liakhovetski
2008-12-03 10:03 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2008-11-24 9:51 UTC (permalink / raw)
To: rpurdie; +Cc: linux-kernel
Hi,
this seems to explicitly violate the API as documented in
include/linux/leds.h:
/* Set LED brightness level */
/* Must not sleep, use a workqueue if needed */
void (*brightness_set)(struct led_classdev *led_cdev,
enum led_brightness brightness);
and also contradicts some other drivers, e.g., pca955x, which do use a
workqueue as suggested: leds-pca9532.c::pca9532_set_brightness uses a
mutex for locking and calls i2c_smbus functions directly. Needs to be
fixed (if it hasn't been fixed yet), probably, also vor 2.6.27-stable.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: leds/leds-pca9532.c: sleeping function called in .brightness_set()
2008-11-24 9:51 leds/leds-pca9532.c: sleeping function called in .brightness_set() Guennadi Liakhovetski
@ 2008-12-03 10:03 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2008-12-03 10:03 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: linux-kernel
On Mon, 2008-11-24 at 10:51 +0100, Guennadi Liakhovetski wrote:
> this seems to explicitly violate the API as documented in
> include/linux/leds.h:
>
> /* Set LED brightness level */
> /* Must not sleep, use a workqueue if needed */
> void (*brightness_set)(struct led_classdev *led_cdev,
> enum led_brightness brightness);
>
> and also contradicts some other drivers, e.g., pca955x, which do use a
> workqueue as suggested: leds-pca9532.c::pca9532_set_brightness uses a
> mutex for locking and calls i2c_smbus functions directly. Needs to be
> fixed (if it hasn't been fixed yet), probably, also vor 2.6.27-stable.
There is a patch queued to fix this now. I'll submit some fixes to
2.6.28-rcX shortly and then we can consider it for -stable.
Cheers,
Richard
--
Richard Purdie
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-03 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 9:51 leds/leds-pca9532.c: sleeping function called in .brightness_set() Guennadi Liakhovetski
2008-12-03 10:03 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox