From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH/RFC] CPM1: implement GPIO API
Date: Wed, 12 Dec 2007 23:16:33 +0100 [thread overview]
Message-ID: <200712122316.34354.arnd@arndb.de> (raw)
In-Reply-To: <47600F5E.8060907@scram.de>
On Wednesday 12 December 2007, Jochen Friedrich wrote:
> +static spinlock_t *cpm1_port_locks;
> +static int cpm1_num_ports;
Having an array of spinlocks is rather unusual and normally not necessary.
Did you measure a significant performance impact by using a global lock
for all ports?
If not, I would recommend simplifying this.
> +EXPORT_SYMBOL_GPL(gpio_request);
> +EXPORT_SYMBOL_GPL(gpio_direction_input);
> +EXPORT_SYMBOL_GPL(gpio_direction_output);
> +EXPORT_SYMBOL_GPL(gpio_get_value);
> +EXPORT_SYMBOL_GPL(gpio_set_value);
All these function names are rather generic identifiers, but you export them
from a platform specific file. I'd say they should either have a more specific
name space (e.g. cpm1_gpio_request), or should be implemented in a more
generic way.
Arnd <><
next prev parent reply other threads:[~2007-12-12 22:16 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 [this message]
2007-12-13 0:53 ` Anton Vorontsov
2007-12-13 16:48 ` Scott Wood
2007-12-13 16:55 ` Scott Wood
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=200712122316.34354.arnd@arndb.de \
--to=arnd@arndb.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 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.