* [PATCH] i2c: zx2967: always use the same device when printing errors
@ 2017-06-23 19:05 Wolfram Sang
2017-06-24 13:46 ` Shawn Guo
2017-06-27 19:59 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-06-23 19:05 UTC (permalink / raw)
To: linux-i2c; +Cc: Shawn Guo, Wolfram Sang
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] i2c: zx2967: always use the same device when printing errors
2017-06-23 19:05 [PATCH] i2c: zx2967: always use the same device when printing errors Wolfram Sang
@ 2017-06-24 13:46 ` Shawn Guo
2017-06-27 19:59 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2017-06-24 13:46 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c
On Fri, Jun 23, 2017 at 09:05:30PM +0200, Wolfram Sang wrote:
> 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>
Acked-by: Shawn Guo <shawnguo@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: zx2967: always use the same device when printing errors
2017-06-23 19:05 [PATCH] i2c: zx2967: always use the same device when printing errors Wolfram Sang
2017-06-24 13:46 ` Shawn Guo
@ 2017-06-27 19:59 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-06-27 19:59 UTC (permalink / raw)
To: linux-i2c; +Cc: Shawn Guo
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
On Fri, Jun 23, 2017 at 09:05:30PM +0200, Wolfram Sang wrote:
> 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>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-27 19:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-23 19:05 [PATCH] i2c: zx2967: always use the same device when printing errors Wolfram Sang
2017-06-24 13:46 ` Shawn Guo
2017-06-27 19:59 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox