From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
suzuki.poulose@arm.com, Wolfram Sang <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org
Subject: [RFC PATCH 06/57] drivers: i2c: i2c-core: Use bus_find_device_by_of_node helper
Date: Mon, 3 Jun 2019 16:49:32 +0100 [thread overview]
Message-ID: <1559577023-558-7-git-send-email-suzuki.poulose@arm.com> (raw)
In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com>
Switch to using the bus_find_device_by_of_node helper.
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/i2c/i2c-core-of.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 406e5f6..b0b3fe1 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -112,11 +112,6 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
of_node_put(bus);
}
-static int of_dev_node_match(struct device *dev, void *data)
-{
- return dev->of_node == data;
-}
-
static int of_dev_or_parent_node_match(struct device *dev, void *data)
{
if (dev->of_node == data)
@@ -134,7 +129,7 @@ struct i2c_client *of_find_i2c_device_by_node(struct device_node *node)
struct device *dev;
struct i2c_client *client;
- dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match);
+ dev = bus_find_device_by_of_node(&i2c_bus_type, NULL, node);
if (!dev)
return NULL;
--
2.7.4
next prev parent reply other threads:[~2019-06-03 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 15:49 [RFC PATCH 00/57] drivers: Consolidate device lookup helpers Suzuki K Poulose
2019-06-03 15:49 ` Suzuki K Poulose [this message]
2019-06-03 15:49 ` [RFC PATCH 22/57] drivers: i2c: Use generic helper to match device by acpi_dev Suzuki K Poulose
2019-06-04 9:27 ` Mika Westerberg
2019-06-06 20:03 ` Wolfram Sang
2019-06-10 12:49 ` Suzuki K Poulose
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=1559577023-558-7-git-send-email-suzuki.poulose@arm.com \
--to=suzuki.poulose@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.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).