linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Haavard Skinnemoen" <hskinnemoen@gmail.com>,
	"Hans-Christian Egtvedt" <egtvedt@samfundet.no>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Jiri Kosina" <jikos@kernel.org>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	"Jacek Anaszewski" <j.anaszewski@samsung.com>,
	"Mauro Carvalho Chehab" <mchehab@osg.samsung.com>,
	"Lee Jones" <lee.jones@linaro.org>, "Alek Du" <alek.du@intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>
Subject: Re: [PATCH] gpio: change member .dev to .parent
Date: Thu, 5 Nov 2015 10:08:47 -0800	[thread overview]
Message-ID: <20151105180847.GA36023@dtor-ws> (raw)
In-Reply-To: <1446629475-31754-1-git-send-email-linus.walleij@linaro.org>

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 <hskinnemoen@gmail.com>
> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> Cc: Rafał Miłecki <zajec5@gmail.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Alek Du <alek.du@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2015-11-05 18:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  9:31 [PATCH] gpio: change member .dev to .parent Linus Walleij
2015-11-04  9:33 ` Jiri Kosina
2015-11-04  9:54 ` Hans-Christian Noren Egtvedt
2015-11-04 13:26 ` Jacek Anaszewski
2015-11-04 17:13 ` Lee Jones
2015-11-05 10:01   ` Linus Walleij
2015-11-04 17:13 ` Greg Kroah-Hartman
2015-11-05 18:08 ` Dmitry Torokhov [this message]

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=20151105180847.GA36023@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=alek.du@intel.com \
    --cc=egtvedt@samfundet.no \
    --cc=gregkh@linuxfoundation.org \
    --cc=hskinnemoen@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=jikos@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=perex@perex.cz \
    --cc=rpurdie@rpsys.net \
    --cc=tiwai@suse.com \
    --cc=zajec5@gmail.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;
as well as URLs for NNTP newsgroup(s).