Hi Kaneko-san,
On Fri, Nov 7, 2014 at 10:23 AM, Yoshihiro Kaneko <[email protected]> wrote:
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -1,6 +1,7 @@
> /*
> * Renesas R-Car GPIO Support
> *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> * Copyright (C) 2013 Magnus Damm
> *
> * This program is free software; you can redistribute it and/or modify
> @@ -327,6 +328,16 @@ static const struct of_device_id gpio_rcar_of_table[] = {
> .has_both_edge_trigger = true,
> },
> }, {
> + .compatible = "renesas,gpio-r8a7793",
> + .data = (void *)&(const struct gpio_rcar_info) {
> + .has_both_edge_trigger = true,
> + },
> + }, {
> + .compatible = "renesas,gpio-r8a7794",
> + .data = (void *)&(const struct gpio_rcar_info) {
> + .has_both_edge_trigger = true,
> + },
Given we now have 4 identical copies of the above struct gpio_rcar_info,
I think it starts to make sense to create
static struct gpio_rcar_info gpio_rcar_info_gen2 = {
.has_both_edge_trigger = true;
};
and just reference that one from gpio_rcar_of_table[].
While at it, you can do the same for R-Car Gen 1 for consistency.
> + }, {
Otherwise:
Acked-by: Geert Uytterhoeven <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html