i2c: zx2967: always use the same device when printing errors

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>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Wolfram Sang 2017-06-23 21:05:30 +02:00
parent df40f24775
commit c3518a4ed8
1 changed files with 1 additions and 1 deletions

View File

@ -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;