From: Andrew Morton <akpm@linux-foundation.org>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
"Milo(Woogyom) Kim" <milo.kim@ti.com>
Subject: Re: [PATCH] backlight: Use id->driver_data to differentiate lp855x chips
Date: Thu, 22 Mar 2012 14:51:22 -0700 [thread overview]
Message-ID: <20120322145122.7d2f75e9.akpm@linux-foundation.org> (raw)
In-Reply-To: <1332324687.12310.2.camel@phoenix>
On Wed, 21 Mar 2012 18:11:27 +0800
Axel Lin <axel.lin@gmail.com> wrote:
> Current code has corresponding driver_data settings for different chip types.
> Use the driver_data to differentiate lp855x chips.
>
> Also make lp855x_is_valid_rom_area() return bool instead of int.
>
> -static int lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
> +static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
> {
>
> ...
>
> - return (addr >= start && addr <= end) ? 1 : 0;
> + return (addr >= start && addr <= end) ? true : false;
> }
This:
--- a/drivers/video/backlight/lp855x_bl.c~backlight-use-id-driver_data-to-differentiate-lp855x-chips-fix
+++ a/drivers/video/backlight/lp855x_bl.c
@@ -82,7 +82,7 @@ static bool lp855x_is_valid_rom_area(str
return false;
}
- return (addr >= start && addr <= end) ? true : false;
+ return (addr >= start && addr <= end);
}
static int lp855x_init_registers(struct lp855x *lp)
_
prev parent reply other threads:[~2012-03-22 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 10:11 [PATCH] backlight: Use id->driver_data to differentiate lp855x chips Axel Lin
2012-03-21 11:16 ` Kim, Milo
2012-03-22 21:51 ` Andrew Morton [this message]
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=20120322145122.7d2f75e9.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axel.lin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=milo.kim@ti.com \
--cc=rpurdie@rpsys.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.