Thread (7 messages) 7 messages, 3 authors, 2012-07-09

Re: [PATCH] pwm_backlight: pass correct brightness to callback

flat view

From: Alex Courbot <acourbot@nvidia.com>
Date: 2012-07-09 05:25:45
Also in: lkml

On 07/09/2012 02:10 PM, Thierry Reding wrote:
I had to actually read this patch a number of times and then realized I
was completely missing the context. Looking at the whole function makes
it more obvious what you mean.

However I think it'd be much clearer if we just passed the value of
bl->props.brightness into the callbacks, that way we can avoid the
additional variable.
This won't work I'm afraid, as brightness can be modified prior to being 
passed to the callback function:

	if (bl->props.power != FB_BLANK_UNBLANK)
		brightness = 0;

	if (bl->props.fb_blank != FB_BLANK_UNBLANK)
		brightness = 0;

	if (pb->notify)
		brightness = pb->notify(pb->dev, brightness);

Alex.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help