From: Scott Wood <scottwood@freescale.com>
To: Jochen Friedrich <jochen@scram.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH/RFC] CPM1: implement GPIO API
Date: Thu, 13 Dec 2007 10:55:30 -0600 [thread overview]
Message-ID: <20071213165530.GB4347@loki.buserror.net> (raw)
In-Reply-To: <47600F5E.8060907@scram.de>
On Wed, Dec 12, 2007 at 05:42:06PM +0100, Jochen Friedrich wrote:
> +int cpm_init_par_io(void)
> +{
> + int ret;
> + struct device_node *np;
> + const u32 *num_ports;
> + int i;
> +
> + np = of_find_node_by_name(NULL, "par_io");
> + if (!np) {
> + ret = -ENOENT;
> + goto err0;
> + }
Shouldn't this lookup be by compatible (something like fsl,cpm1-gpio would
be good)?
> +int gpio_request(unsigned int gpio, const char *label)
> +{
> + if (!cpm1_port_locks)
> + return -ENODEV;
> +
> + if (gpio / 32 > cpm1_num_ports)
> + return -EINVAL;
Shouldn't this be ">="?
> + return 0;
No already-requested check?
> +}
> +EXPORT_SYMBOL_GPL(gpio_request);
This is an API, not internals; can we stick with plain EXPORT_SYMBOL()?
-Scott
next prev parent reply other threads:[~2007-12-13 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 16:42 [PATCH/RFC] CPM1: implement GPIO API Jochen Friedrich
2007-12-12 22:16 ` Arnd Bergmann
2007-12-13 0:53 ` Anton Vorontsov
2007-12-13 16:48 ` Scott Wood
2007-12-13 16:55 ` Scott Wood [this message]
2007-12-13 20:31 ` Arnd Bergmann
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=20071213165530.GB4347@loki.buserror.net \
--to=scottwood@freescale.com \
--cc=jochen@scram.de \
--cc=linuxppc-dev@ozlabs.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).