From: akpm@linux-foundation.org (Andrew Morton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] backlight: corgi_lcd: Use gpio_set_value_cansleep() to avoid WARN_ON
Date: Tue, 4 Dec 2012 14:58:22 -0800 [thread overview]
Message-ID: <20121204145822.056b6cf6.akpm@linux-foundation.org> (raw)
In-Reply-To: <000b01cdd1e0$293f0d90$7bbd28b0$%han@samsung.com>
On Tue, 04 Dec 2012 14:28:15 +0900
Jingoo Han <jg1.han@samsung.com> wrote:
> From: Marko Katic <dromede@gmail.com>
>
> Changing backlight intensity on an Akita (Sharp Zaurus C-1000)
> triggers WARN_ON message:
Well, I queued it up.
> ...
>
> --- a/drivers/video/backlight/corgi_lcd.c
> +++ b/drivers/video/backlight/corgi_lcd.c
> @@ -408,11 +408,20 @@ static int corgi_bl_set_intensity(struct corgi_lcd *lcd, int intensity)
> /* Bit 5 via GPIO_BACKLIGHT_CONT */
> cont = !!(intensity & 0x20) ^ lcd->gpio_backlight_cont_inverted;
>
> - if (gpio_is_valid(lcd->gpio_backlight_cont))
> - gpio_set_value(lcd->gpio_backlight_cont, cont);
> + if (gpio_is_valid(lcd->gpio_backlight_cont)) {
> + if (gpio_cansleep(lcd->gpio_backlight_cont))
> + gpio_set_value_cansleep(lcd->gpio_backlight_cont, cont);
> + else
> + gpio_set_value(lcd->gpio_backlight_cont, cont);
> + }
But this looks utterly daft. Grant, these two things are the same - do
we need both of them?
next prev parent reply other threads:[~2012-12-04 22:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 5:28 [PATCH v3] backlight: corgi_lcd: Use gpio_set_value_cansleep() to avoid WARN_ON Jingoo Han
2012-12-04 22:58 ` Andrew Morton [this message]
2012-12-05 1:17 ` Jingoo Han
2012-12-04 23:27 ` Marko Katić
2012-12-05 0:29 ` 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=20121204145822.056b6cf6.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).