From: Wolfram Sang <wsa@the-dreams.de>
To: linux-i2c@vger.kernel.org
Cc: Shawn Guo <shawnguo@kernel.org>, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] i2c: zx2967: always use the same device when printing errors
Date: Fri, 23 Jun 2017 21:05:30 +0200 [thread overview]
Message-ID: <20170623190530.19614-1-wsa@the-dreams.de> (raw)
Let's always use the platform device for dev_* and not sometimes the
adapter device as well. Also fix this checkpatch check:
CHECK: Macro argument 'i2c' may be better as '(i2c)' to avoid precedence issues
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
drivers/i2c/busses/i2c-zx2967.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-zx2967.c b/drivers/i2c/busses/i2c-zx2967.c
index 3e381edc0f223a..48281c1b30c6d5 100644
--- a/drivers/i2c/busses/i2c-zx2967.c
+++ b/drivers/i2c/busses/i2c-zx2967.c
@@ -53,7 +53,7 @@
#define I2C_TIMEOUT msecs_to_jiffies(1000)
-#define DEV(i2c) (&i2c->adap.dev)
+#define DEV(i2c) ((i2c)->adap.dev.parent)
struct zx2967_i2c {
struct i2c_adapter adap;
--
2.11.0
next reply other threads:[~2017-06-23 19:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 19:05 Wolfram Sang [this message]
2017-06-24 13:46 ` [PATCH] i2c: zx2967: always use the same device when printing errors Shawn Guo
2017-06-27 19:59 ` Wolfram Sang
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=20170623190530.19614-1-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=linux-i2c@vger.kernel.org \
--cc=shawnguo@kernel.org \
/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