diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2019-07-23 18:18:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-30 07:07:41 -0400 |
commit | cfba5de9b99f8bbb8b4ea11b3049784e78b8759b (patch) | |
tree | 1c9f123ae5f350f61efa4d6c5730bba20601b74a /sound | |
parent | 6cda08a20dbde45b021091230c8a359fa08c5103 (diff) |
drivers: Introduce device lookup variants by of_node
Introduce wrappers for {bus/driver/class}_find_device() to
locate devices by its of_node.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: devicetree@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: linux-i2c@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-spi@vger.kernel.org
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Alan Tull <atull@kernel.org>
Cc: linux-fpga@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Thor Thayer <thor.thayer@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Peter Rosin <peda@axentia.se>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de> # I2C part
Acked-by: Moritz Fischer <mdf@kernel.org> # For FPGA part
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20190723221838.12024-3-suzuki.poulose@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/rockchip/rk3399_gru_sound.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index c16b0ffe8cfc..d951100bf770 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c | |||
@@ -422,11 +422,6 @@ static const struct dailink_match_data dailink_match[] = { | |||
422 | }, | 422 | }, |
423 | }; | 423 | }; |
424 | 424 | ||
425 | static int of_dev_node_match(struct device *dev, const void *data) | ||
426 | { | ||
427 | return dev->of_node == data; | ||
428 | } | ||
429 | |||
430 | static int rockchip_sound_codec_node_match(struct device_node *np_codec) | 425 | static int rockchip_sound_codec_node_match(struct device_node *np_codec) |
431 | { | 426 | { |
432 | struct device *dev; | 427 | struct device *dev; |
@@ -438,8 +433,8 @@ static int rockchip_sound_codec_node_match(struct device_node *np_codec) | |||
438 | continue; | 433 | continue; |
439 | 434 | ||
440 | if (dailink_match[i].bus_type) { | 435 | if (dailink_match[i].bus_type) { |
441 | dev = bus_find_device(dailink_match[i].bus_type, NULL, | 436 | dev = bus_find_device_by_of_node(dailink_match[i].bus_type, |
442 | np_codec, of_dev_node_match); | 437 | np_codec); |
443 | if (!dev) | 438 | if (!dev) |
444 | continue; | 439 | continue; |
445 | put_device(dev); | 440 | put_device(dev); |