From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH] gpio: change member .dev to .parent Date: Thu, 5 Nov 2015 10:08:47 -0800 Message-ID: <20151105180847.GA36023@dtor-ws> References: <1446629475-31754-1-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-pa0-f46.google.com ([209.85.220.46]:36148 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964781AbbKESIv (ORCPT ); Thu, 5 Nov 2015 13:08:51 -0500 Received: by pacdm15 with SMTP id dm15so69844253pac.3 for ; Thu, 05 Nov 2015 10:08:50 -0800 (PST) Content-Disposition: inline In-Reply-To: <1446629475-31754-1-git-send-email-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij Cc: linux-gpio@vger.kernel.org, Alexandre Courbot , Haavard Skinnemoen , Hans-Christian Egtvedt , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Jiri Kosina , Richard Purdie , Jacek Anaszewski , Mauro Carvalho Chehab , Lee Jones , Alek Du , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai 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. >=20 > 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: >=20 > @@ > struct gpio_chip *var; > @@ > -var->dev > +var->parent >=20 > and: >=20 > @@ > struct gpio_chip var; > @@ > -var.dev > +var.parent >=20 > 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. >=20 > Cc: Haavard Skinnemoen > Cc: Hans-Christian Egtvedt > Cc: Rafa=C5=82 Mi=C5=82ecki > Cc: Jiri Kosina > Cc: Dmitry Torokhov > Cc: Richard Purdie > Cc: Jacek Anaszewski > Cc: Mauro Carvalho Chehab > Cc: Lee Jones > Cc: Alek Du > Cc: Greg Kroah-Hartman > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Signed-off-by: Linus Walleij Acked-by: Dmitry Torokhov Thanks. --=20 Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html