On 11/04/2015 10:31 AM, Linus Walleij wrote:
The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.

This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:

@@
struct gpio_chip *var;
@@
-var->dev
+var->parent

and:

@@
struct gpio_chip var;
@@
-var.dev
+var.parent

This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.

Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Rafał Miłecki <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Jacek Anaszewski <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Alek Du <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
---
Other subsystem maintainers: please ACK this. I want to merge this
big patch in the beginning of -rc1. I can create an immutable branch
or tag if you think it will cause you problems, so you can pull it
in.
---
[...]

For drivers/leds:

Acked-by: Jacek Anaszewski <[email protected]>

--
Best Regards,
Jacek Anaszewski
--
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

Reply via email to