From: Luca Ceresoli <lucaceresoli77@gmail.com>
To: linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Luca Ceresoli <luca@lucaceresoli.net>,
Peter Rosin <peda@axentia.se>,
Vadim Pasternak <vadimp@mellanox.com>,
Michael Shych <michaelsh@mellanox.com>,
Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH v2 2/3] i2c: mux: ltc4306: simplify code to reach the adapter
Date: Wed, 3 Oct 2018 17:50:23 +0200 [thread overview]
Message-ID: <20181003155024.16024-2-lucaceresoli77@gmail.com> (raw)
In-Reply-To: <20181003155024.16024-1-lucaceresoli77@gmail.com>
From: Luca Ceresoli <luca@lucaceresoli.net>
struct i2c_client has a direct pointer to the adapter, no need to dig
it out of the struct device tree.
Suggested-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c
index a9af93259b19..83a714605cd6 100644
--- a/drivers/i2c/muxes/i2c-mux-ltc4306.c
+++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c
@@ -208,7 +208,7 @@ MODULE_DEVICE_TABLE(of, ltc4306_of_match);
static int ltc4306_probe(struct i2c_client *client)
{
- struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
+ struct i2c_adapter *adap = client->adapter;
const struct chip_desc *chip;
struct i2c_mux_core *muxc;
struct ltc4306 *data;
--
2.17.1
next prev parent reply other threads:[~2018-10-03 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 15:50 [PATCH v2 1/3] i2c: mux: pca954x: simplify code to reach the adapter Luca Ceresoli
2018-10-03 15:50 ` Luca Ceresoli [this message]
2018-10-05 11:43 ` [PATCH v2 2/3] i2c: mux: ltc4306: " Wolfram Sang
2018-10-03 15:50 ` [PATCH v2 3/3] i2c: mux: mlxcpld: " Luca Ceresoli
2018-10-05 11:43 ` Wolfram Sang
2018-10-05 11:43 ` [PATCH v2 1/3] i2c: mux: pca954x: " Wolfram Sang
2018-10-08 21:48 ` Peter Rosin
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=20181003155024.16024-2-lucaceresoli77@gmail.com \
--to=lucaceresoli77@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@lucaceresoli.net \
--cc=michael.hennerich@analog.com \
--cc=michaelsh@mellanox.com \
--cc=peda@axentia.se \
--cc=vadimp@mellanox.com \
/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).