On Wed, Nov 04, 2015 at 10:31:15AM +0100, 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 <hskinnem...@gmail.com> > Cc: Hans-Christian Egtvedt <egtv...@samfundet.no> > Cc: Rafał Miłecki <zaj...@gmail.com> > Cc: Jiri Kosina <ji...@kernel.org> > Cc: Dmitry Torokhov <dmitry.torok...@gmail.com> > Cc: Richard Purdie <rpur...@rpsys.net> > Cc: Jacek Anaszewski <j.anaszew...@samsung.com> > Cc: Mauro Carvalho Chehab <mche...@osg.samsung.com> > Cc: Lee Jones <lee.jo...@linaro.org> > Cc: Alek Du <alek...@intel.com> > Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> > Cc: Jaroslav Kysela <pe...@perex.cz> > Cc: Takashi Iwai <ti...@suse.com> > Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
Acked-by: Dmitry Torokhov <dmitry.torok...@gmail.com> Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html