From: Ralf Baechle <ralf@linux-mips.org>
To: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org, Thomas Langer <thomas.langer@lantiq.com>
Subject: Re: [PATCH V2 2/6] MIPS: lantiq: change ltq_request_gpio() call signature
Date: Thu, 17 Nov 2011 16:46:49 +0000 [thread overview]
Message-ID: <20111117164649.GE26457@linux-mips.org> (raw)
In-Reply-To: <1321453698-2598-2-git-send-email-blogic@openwrt.org>
On Wed, Nov 16, 2011 at 03:28:14PM +0100, John Crispin wrote:
> diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
> index be1e1af..c001c5a 100644
> --- a/arch/mips/pci/pci-lantiq.c
> +++ b/arch/mips/pci/pci-lantiq.c
> @@ -70,28 +70,27 @@
>
> struct ltq_pci_gpio_map {
> int pin;
> - int alt0;
> - int alt1;
> + int mux;
> int dir;
> char *name;
> };
You could save some memory here by using a shorter data type
such as char. This is not the Alpha, no performance penalty for
using types smaller than int :)
> /* the pci core can make use of the following gpios */
> static struct ltq_pci_gpio_map ltq_pci_gpio_map[] = {
> - { 0, 1, 0, 0, "pci-exin0" },
> - { 1, 1, 0, 0, "pci-exin1" },
> - { 2, 1, 0, 0, "pci-exin2" },
> - { 39, 1, 0, 0, "pci-exin3" },
> - { 10, 1, 0, 0, "pci-exin4" },
> - { 9, 1, 0, 0, "pci-exin5" },
> - { 30, 1, 0, 1, "pci-gnt1" },
> - { 23, 1, 0, 1, "pci-gnt2" },
> - { 19, 1, 0, 1, "pci-gnt3" },
> - { 38, 1, 0, 1, "pci-gnt4" },
> - { 29, 1, 0, 0, "pci-req1" },
> - { 31, 1, 0, 0, "pci-req2" },
> - { 3, 1, 0, 0, "pci-req3" },
> - { 37, 1, 0, 0, "pci-req4" },
> + { 0, 2, 0, "pci-exin0" },
> + { 1, 2, 0, "pci-exin1" },
> + { 2, 2, 0, "pci-exin2" },
> + { 39, 2, 0, "pci-exin3" },
> + { 10, 2, 0, "pci-exin4" },
> + { 9, 2, 0, "pci-exin5" },
> + { 30, 2, 1, "pci-gnt1" },
> + { 23, 2, 1, "pci-gnt2" },
> + { 19, 2, 1, "pci-gnt3" },
> + { 38, 2, 1, "pci-gnt4" },
> + { 29, 2, 0, "pci-req1" },
> + { 31, 2, 0, "pci-req2" },
> + { 3, 2, 0, "pci-req3" },
> + { 37, 2, 0, "pci-req4" },
Can you use named initializers here?
{ .pin = 0, .mux = 2, .dir = 0, .name = "pci_exin0", },
...
Ralf
next prev parent reply other threads:[~2011-11-17 16:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 14:28 [PATCH V2 1/6] MIPS: lantiq: reorganize xway code John Crispin
2011-11-16 14:28 ` [PATCH V2 2/6] MIPS: lantiq: change ltq_request_gpio() call signature John Crispin
2011-11-17 16:46 ` Ralf Baechle [this message]
2011-11-16 14:28 ` [PATCH V2 3/6] MIPS: lantiq: make irq.c support the FALC-ON John Crispin
2011-11-17 16:52 ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 4/6] MIPS: lantiq: add basic support for FALC-ON John Crispin
2011-11-17 17:01 ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 5/6] MIPS: lantiq: add support for FALC-ON GPIOs John Crispin
2011-11-16 14:28 ` [PATCH V2 6/6] MIPS: lantiq: add support for the EASY98000 evaluation board John Crispin
2011-11-17 16:28 ` [PATCH V2 1/6] MIPS: lantiq: reorganize xway code Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2011-11-21 13:35 John Crispin
2011-11-21 13:35 ` [PATCH V2 2/6] MIPS: lantiq: change ltq_request_gpio() call signature John Crispin
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=20111117164649.GE26457@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=blogic@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=thomas.langer@lantiq.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