From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: pxa: palm27x: fix lcd device initialization
Date: Sun, 23 Dec 2012 04:24:48 +0100 [thread overview]
Message-ID: <201212230424.48655.marex@denx.de> (raw)
In-Reply-To: <1356200860-3241-3-git-send-email-mikedunn@newsguy.com>
Dear Mike Dunn,
> This fixes incorrect tests of the return codes from gpiolib functions in
> palm27x_lcd_init(). Currently a return code of 0 is incorrectly
> interpreted as an error. A call to gpio_free() is also added.
>
> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
> ---
> arch/arm/mach-pxa/palm27x.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c
> index 298a8a9..473c9e3 100644
> --- a/arch/arm/mach-pxa/palm27x.c
> +++ b/arch/arm/mach-pxa/palm27x.c
> @@ -145,12 +145,13 @@ void __init palm27x_lcd_init(int power, struct
> pxafb_mode_info *mode) palm27x_lcd_screen.modes = mode;
>
> if (gpio_is_valid(power)) {
> - if (!gpio_request(power, "LCD power")) {
> + if (gpio_request(power, "LCD power") < 0) {
> pr_err("Palm27x: failed to claim lcd power gpio!\n");
> return;
> }
> - if (!gpio_direction_output(power, 1)) {
> + if (gpio_direction_output(power, 1) < 0) {
> pr_err("Palm27x: lcd power configuration failed!\n");
> + gpio_free(power);
> return;
> }
> palm27x_lcd_power = power;
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
prev parent reply other threads:[~2012-12-23 3:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-22 18:27 [PATCH 0/2] ARM: pxa: palm27x: device initialization fixes Mike Dunn
2012-12-22 18:27 ` [PATCH 1/2] ARM: pxa: palm27x: fix udc device initialization Mike Dunn
2012-12-23 3:24 ` Marek Vasut
2012-12-24 15:34 ` Robert Jarzmik
2012-12-27 13:16 ` Mike Dunn
2012-12-22 18:27 ` [PATCH 2/2] ARM: pxa: palm27x: fix lcd " Mike Dunn
2012-12-23 3:24 ` Marek Vasut [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=201212230424.48655.marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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.