Commit afc2e8a0 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Mauro Carvalho Chehab

[media] staging/media: Use dev_ or pr_ printks in go7007/go7007-i2c.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b11558a3
...@@ -60,10 +60,10 @@ static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read, ...@@ -60,10 +60,10 @@ static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read,
#ifdef GO7007_I2C_DEBUG #ifdef GO7007_I2C_DEBUG
if (read) if (read)
printk(KERN_DEBUG "go7007-i2c: reading 0x%02x on 0x%02x\n", dev_dbg(go->dev, "go7007-i2c: reading 0x%02x on 0x%02x\n",
command, addr); command, addr);
else else
printk(KERN_DEBUG dev_dbg(go->dev,
"go7007-i2c: writing 0x%02x to 0x%02x on 0x%02x\n", "go7007-i2c: writing 0x%02x to 0x%02x on 0x%02x\n",
*data, command, addr); *data, command, addr);
#endif #endif
...@@ -85,7 +85,7 @@ static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read, ...@@ -85,7 +85,7 @@ static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read,
msleep(100); msleep(100);
} }
if (i == 10) { if (i == 10) {
printk(KERN_ERR "go7007-i2c: I2C adapter is hung\n"); dev_err(go->dev, "go7007-i2c: I2C adapter is hung\n");
goto i2c_done; goto i2c_done;
} }
...@@ -119,7 +119,7 @@ static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read, ...@@ -119,7 +119,7 @@ static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read,
msleep(100); msleep(100);
} }
if (i == 10) { if (i == 10) {
printk(KERN_ERR "go7007-i2c: I2C adapter is hung\n"); dev_err(go->dev, "go7007-i2c: I2C adapter is hung\n");
goto i2c_done; goto i2c_done;
} }
...@@ -216,7 +216,7 @@ int go7007_i2c_init(struct go7007 *go) ...@@ -216,7 +216,7 @@ int go7007_i2c_init(struct go7007 *go)
go->i2c_adapter.dev.parent = go->dev; go->i2c_adapter.dev.parent = go->dev;
i2c_set_adapdata(&go->i2c_adapter, go); i2c_set_adapdata(&go->i2c_adapter, go);
if (i2c_add_adapter(&go->i2c_adapter) < 0) { if (i2c_add_adapter(&go->i2c_adapter) < 0) {
printk(KERN_ERR dev_err(go->dev,
"go7007-i2c: error: i2c_add_adapter failed\n"); "go7007-i2c: error: i2c_add_adapter failed\n");
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment