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

[media] Staging/media: Use dev_ printks in go7007/s2250-board.c

fixed below checkpatch warning.
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b441d033
...@@ -173,7 +173,7 @@ static int write_reg(struct i2c_client *client, u8 reg, u8 value) ...@@ -173,7 +173,7 @@ static int write_reg(struct i2c_client *client, u8 reg, u8 value)
usb = go->hpi_context; usb = go->hpi_context;
if (mutex_lock_interruptible(&usb->i2c_lock) != 0) { if (mutex_lock_interruptible(&usb->i2c_lock) != 0) {
printk(KERN_INFO "i2c lock failed\n"); dev_info(&client->dev, "i2c lock failed\n");
kfree(buf); kfree(buf);
return -EINTR; return -EINTR;
} }
...@@ -212,7 +212,7 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val) ...@@ -212,7 +212,7 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
usb = go->hpi_context; usb = go->hpi_context;
if (mutex_lock_interruptible(&usb->i2c_lock) != 0) { if (mutex_lock_interruptible(&usb->i2c_lock) != 0) {
printk(KERN_INFO "i2c lock failed\n"); dev_info(&client->dev, "i2c lock failed\n");
kfree(buf); kfree(buf);
return -EINTR; return -EINTR;
} }
...@@ -230,12 +230,12 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val) ...@@ -230,12 +230,12 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
val_read = (buf[2] << 8) + buf[3]; val_read = (buf[2] << 8) + buf[3];
kfree(buf); kfree(buf);
if (val_read != val) { if (val_read != val) {
printk(KERN_INFO "invalid fp write %x %x\n", dev_info(&client->dev, "invalid fp write %x %x\n",
val_read, val); val_read, val);
return -EFAULT; return -EFAULT;
} }
if (subaddr != addr) { if (subaddr != addr) {
printk(KERN_INFO "invalid fp write addr %x %x\n", dev_info(&client->dev, "invalid fp write addr %x %x\n",
subaddr, addr); subaddr, addr);
return -EFAULT; return -EFAULT;
} }
...@@ -274,7 +274,7 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val) ...@@ -274,7 +274,7 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val)
memset(buf, 0xcd, 6); memset(buf, 0xcd, 6);
usb = go->hpi_context; usb = go->hpi_context;
if (mutex_lock_interruptible(&usb->i2c_lock) != 0) { if (mutex_lock_interruptible(&usb->i2c_lock) != 0) {
printk(KERN_INFO "i2c lock failed\n"); dev_info(&client->dev, "i2c lock failed\n");
kfree(buf); kfree(buf);
return -EINTR; return -EINTR;
} }
...@@ -298,7 +298,7 @@ static int write_regs(struct i2c_client *client, u8 *regs) ...@@ -298,7 +298,7 @@ static int write_regs(struct i2c_client *client, u8 *regs)
for (i = 0; !((regs[i] == 0x00) && (regs[i+1] == 0x00)); i += 2) { for (i = 0; !((regs[i] == 0x00) && (regs[i+1] == 0x00)); i += 2) {
if (write_reg(client, regs[i], regs[i+1]) < 0) { if (write_reg(client, regs[i], regs[i+1]) < 0) {
printk(KERN_INFO "s2250: failed\n"); dev_info(&client->dev, "failed\n");
return -1; return -1;
} }
} }
...@@ -311,7 +311,7 @@ static int write_regs_fp(struct i2c_client *client, u16 *regs) ...@@ -311,7 +311,7 @@ static int write_regs_fp(struct i2c_client *client, u16 *regs)
for (i = 0; !((regs[i] == 0x00) && (regs[i+1] == 0x00)); i += 2) { for (i = 0; !((regs[i] == 0x00) && (regs[i+1] == 0x00)); i += 2) {
if (write_reg_fp(client, regs[i], regs[i+1]) < 0) { if (write_reg_fp(client, regs[i], regs[i+1]) < 0) {
printk(KERN_INFO "s2250: failed fp\n"); dev_info(&client->dev, "failed fp\n");
return -1; return -1;
} }
} }
...@@ -605,23 +605,20 @@ static int s2250_probe(struct i2c_client *client, ...@@ -605,23 +605,20 @@ static int s2250_probe(struct i2c_client *client,
/* initialize the audio */ /* initialize the audio */
if (write_regs(audio, aud_regs) < 0) { if (write_regs(audio, aud_regs) < 0) {
printk(KERN_ERR dev_err(&client->dev, "error initializing audio\n");
"s2250: error initializing audio\n");
i2c_unregister_device(audio); i2c_unregister_device(audio);
kfree(state); kfree(state);
return 0; return 0;
} }
if (write_regs(client, vid_regs) < 0) { if (write_regs(client, vid_regs) < 0) {
printk(KERN_ERR dev_err(&client->dev, "error initializing decoder\n");
"s2250: error initializing decoder\n");
i2c_unregister_device(audio); i2c_unregister_device(audio);
kfree(state); kfree(state);
return 0; return 0;
} }
if (write_regs_fp(client, vid_regs_fp) < 0) { if (write_regs_fp(client, vid_regs_fp) < 0) {
printk(KERN_ERR dev_err(&client->dev, "error initializing decoder\n");
"s2250: error initializing decoder\n");
i2c_unregister_device(audio); i2c_unregister_device(audio);
kfree(state); kfree(state);
return 0; return 0;
......
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