From: Alex Courbot <acourbot@nvidia.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH] pwm_backlight: pass correct brightness to callback
Date: Mon, 9 Jul 2012 14:27:38 +0900 [thread overview]
Message-ID: <4FFA6BCA.2040101@nvidia.com> (raw)
In-Reply-To: <20120709051001.GA10108@avionic-0098.mockup.avionic-design.de>
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.
next prev parent reply other threads:[~2012-07-09 5:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-09 4:21 [PATCH] pwm_backlight: pass correct brightness to callback Alexandre Courbot
2012-07-09 5:10 ` Thierry Reding
2012-07-09 5:27 ` Alex Courbot [this message]
2012-07-09 5:36 ` [PATCHv2] " Alexandre Courbot
2012-07-09 6:04 ` [PATCHv3] " Alexandre Courbot
2012-07-09 6:30 ` Thierry Reding
2012-07-09 5:11 ` [PATCH] " Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FFA6BCA.2040101@nvidia.com \
--to=acourbot@nvidia.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@avionic-design.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox