linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] of/platform: Make of_dev_node_match() helper public
Date: Fri, 5 May 2017 13:50:53 -0500	[thread overview]
Message-ID: <CAL_JsqKn8CVTMvjD_JwBUENXs9YgsybkVv1PeLQHMB0EDMWbrg@mail.gmail.com> (raw)
In-Reply-To: <1493995961-11828-1-git-send-email-geert+renesas@glider.be>

On Fri, May 5, 2017 at 9:52 AM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Several drivers provide their own match functions, identical to
> of_dev_node_match() in the OF platform core.
>
> Reduce duplication by making of_dev_node_match() public.
> To avoid conflicts, the duplicates in coresight and i2c must be removed
> at the same time.

I think you are down one level too far. At least the 2 users here are
just for calls to bus_find_device. We already have a function for that
with of_find_device_by_node at least for platform devices. Perhaps
rework that to be "struct device *of_find_bus_device_by_node(struct
bus_type *b, struct device_node *np)" and then wrappers for each bus
type. And perhaps make a class variant as well. However, we should
also consider if OF is the right level. Maybe it should be fwnode
functions?

Rob

  reply	other threads:[~2017-05-05 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 14:52 [PATCH] [RFC] of/platform: Make of_dev_node_match() helper public Geert Uytterhoeven
2017-05-05 18:50 ` Rob Herring [this message]
2017-05-05 19:13   ` Geert Uytterhoeven

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=CAL_JsqKn8CVTMvjD_JwBUENXs9YgsybkVv1PeLQHMB0EDMWbrg@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=wsa@the-dreams.de \
    /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).