Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636661

Re: [PATCH] [RFC] of/platform: Make of_dev_node_match() helper public

From Rob Herring <robh+dt@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] [RFC] of/platform: Make of_dev_node_match() helper public
Date 2017-05-05 21:00 +0200
Message-ID <tDQCn-5yw-67@gated-at.bofh.it> (permalink)
References <tDMS6-35I-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] [RFC] of/platform: Make of_dev_node_match() helper public Geert Uytterhoeven <geert+renesas@glider.be> - 2017-05-05 17:00 +0200
  Re: [PATCH] [RFC] of/platform: Make of_dev_node_match() helper public Rob Herring <robh+dt@kernel.org> - 2017-05-05 21:00 +0200
    Re: [PATCH] [RFC] of/platform: Make of_dev_node_match() helper public Geert Uytterhoeven <geert@linux-m68k.org> - 2017-05-05 21:20 +0200

csiph-web