All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-gpio@vger.kernel.org,
	linux-next <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: mediatek: Explicitly include pinctrl headers
Date: Mon, 5 Feb 2018 20:08:58 +0100	[thread overview]
Message-ID: <20180205190858.GA22699@ulmo> (raw)
In-Reply-To: <CACRpkdYrG6=qwJgOTW2ccyq-UBSOkH+EBBui54PtGqJF7CMRDw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]

On Mon, Feb 05, 2018 at 08:02:40PM +0100, Linus Walleij wrote:
> On Mon, Feb 5, 2018 at 6:59 PM, Thierry Reding <thierry.reding@gmail.com> wrote:
> 
> > Anyway, I think going with the pinctrl/devinfo.h include only is fine
> > for now. If it turns out that the Mediatek ethernet and Rockchip LVDS
> > drivers can just omit the bits fiddling with struct dev_pin_info, we can
> > swap out the pinctrl/devinfo.h include for pinctrl/consumer.h at that
> > time.
> >
> > LinusW: what are your thoughts on the struct dev_pin_info usage by these
> > drivers? Does their code seem redundant to you, too?
> 
> I don't think they should use struct dev_pin_info at all,
> that thing is for the device core only.
> 
> I like to think that <linux/pinctrl/consumer.h> is for drivers that
> explicitly grab and control pin control states so this driver should
> only include <linux/pinctrl/consumer.h>.
> 
> Torvalds: can you do it like that instead? Either way will
> make the compile work again, we can also tidy it up later.
> (i.e. I will grep for includes of pinctrl/dev_info.h and replace
> it with consumer.h) at some point.

That won't work, unfortunately, because these drivers actually try to
dereference pointers to struct dev_pin_info and hence need that include
for the structure's definition. Those are the only two drivers I can see
that access this structure directly (other than the device core).

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-02-05 19:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05 12:47 [PATCH 0/2] pinctrl: Implicit inclusion fallout fixes Thierry Reding
2018-02-05 12:47 ` [PATCH 1/2] drm/rockchip: lvds: Explicitly include pinctrl headers Thierry Reding
2018-02-05 12:47 ` [PATCH 2/2] mmc: meson-gx-mmc: Explicitly include pinctr/consumer.h Thierry Reding
2018-02-05 12:54 ` [PATCH] net: mediatek: Explicitly include pinctrl headers Thierry Reding
2018-02-05 17:42   ` Linus Torvalds
2018-02-05 17:59     ` Thierry Reding
2018-02-05 19:02       ` Linus Walleij
2018-02-05 19:08         ` Thierry Reding [this message]
2018-02-05 23:03           ` Linus Walleij

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=20180205190858.GA22699@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.