From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jun Nie <niej0001@gmail.com>
Cc: linux-fbdev-devel@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] pxa: support pxa168 LCD controller SPI operation
Date: Sun, 8 Nov 2009 16:53:50 +0000 [thread overview]
Message-ID: <20091108165350.GA28368@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <7c34ac520911022245x2845e5dex1311bd74a08606db@mail.gmail.com>
On Tue, Nov 03, 2009 at 02:45:20PM +0800, Jun Nie wrote:
> diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c
> index 84d8327..27bdf2b 100644
> --- a/drivers/video/pxa168fb.c
> +++ b/drivers/video/pxa168fb.c
> @@ -29,10 +29,91 @@
> #include <linux/uaccess.h>
> #include <video/pxa168fb.h>
>
> +#include <mach/pxa168fb.h>
> +#include <mach/gpio.h>
linux/gpio.h
> +int pxa168fb_spi_send(struct pxa168fb_info *fbi, void *value, int count,
> + unsigned int spi_gpio_cs, unsigned int interval_us)
> +{
> + u32 x, spi_byte_len;
> + u8 *cmd = (u8 *)value;
> + int i, err, isr, iopad, ret = 0;
> +
> + if (gpio_is_valid(spi_gpio_cs)) {
> + err = gpio_request(spi_gpio_cs, "LCD_SPI_CS");
> + if (err) {
> + dev_err(fbi->dev, "failed to request GPIO for LCD CS\n");
> + return -1;
Please stop using '-1' as a general error return value. It has a specific
meaning, translating as "operation not permitted" or "permission denied".
This is not what this error is. Always propagate error codes back when
you have them.
prev parent reply other threads:[~2009-11-08 16:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 6:45 [PATCH 1/6] pxa: support pxa168 LCD controller SPI operation Jun Nie
2009-11-03 7:28 ` Jun Nie
2009-11-03 8:32 ` Eric Miao
2009-11-08 16:53 ` Russell King - ARM Linux [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=20091108165350.GA28368@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=niej0001@gmail.com \
/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).