linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 8/8] pxa: add frame buffer on pxa910 ttc_dkb platform
Date: Thu, 12 Nov 2009 22:21:11 +0000	[thread overview]
Message-ID: <20091112222111.GE12308@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <7c34ac520911111820y5581951dya17ab06b904ff63f@mail.gmail.com>

On Thu, Nov 12, 2009 at 10:20:20AM +0800, Jun Nie wrote:
> +static int tpo_lcd_power(struct pxa168fb_info *fbi, unsigned int spi_gpio_cs, unsigned int spi_gpio_reset, int on)
> +{
> +	int err = 0;
> +
> +	if (on) {
> +		if (spi_gpio_reset != -1) {
> +			err = gpio_request(spi_gpio_reset, "TPO_LCD_SPI_RESET");
> +			if (err) {
> +				printk("failed to request GPIO for TPO LCD RESET\n");
> +				return -1;

Do you really mean -EPERM here?  If not, use a proper error code such as
the one you got from gpio_request().  (Never, ever, use a literal "-1" as
an error indicator in the kernel.)

  reply	other threads:[~2009-11-12 22:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10  8:12 [PATCH 8/8] pxa: add frame buffer on pxa910 ttc_dkb platform Jun Nie
2009-11-12  2:20 ` Jun Nie
2009-11-12 22:21   ` Russell King - ARM Linux [this message]
2009-11-16  9:35 ` Jun Nie
2009-11-19  9:04   ` Jun Nie
2009-11-19  9:13     ` Russell King - ARM Linux
2009-11-23  5:55       ` Jun Nie

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=20091112222111.GE12308@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).