Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357108
b: refs/heads/master
c: 5820deb
h: refs/heads/master
v: v3
  • Loading branch information
YAMANE Toshiaki authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent 857a81b commit 053b33b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b441d03331cabcf14352465b7b0951f0c8d69481
refs/heads/master: 5820debccb530a8a5456f358e92d8272aa2902ae
27 changes: 12 additions & 15 deletions trunk/drivers/staging/media/go7007/s2250-board.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static int write_reg(struct i2c_client *client, u8 reg, u8 value)

usb = go->hpi_context;
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);
return -EINTR;
}
Expand Down Expand Up @@ -212,7 +212,7 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)

usb = go->hpi_context;
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);
return -EINTR;
}
Expand All @@ -230,13 +230,13 @@ static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
val_read = (buf[2] << 8) + buf[3];
kfree(buf);
if (val_read != val) {
printk(KERN_INFO "invalid fp write %x %x\n",
val_read, val);
dev_info(&client->dev, "invalid fp write %x %x\n",
val_read, val);
return -EFAULT;
}
if (subaddr != addr) {
printk(KERN_INFO "invalid fp write addr %x %x\n",
subaddr, addr);
dev_info(&client->dev, "invalid fp write addr %x %x\n",
subaddr, addr);
return -EFAULT;
}
} else {
Expand Down Expand Up @@ -274,7 +274,7 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val)
memset(buf, 0xcd, 6);
usb = go->hpi_context;
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);
return -EINTR;
}
Expand All @@ -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) {
if (write_reg(client, regs[i], regs[i+1]) < 0) {
printk(KERN_INFO "s2250: failed\n");
dev_info(&client->dev, "failed\n");
return -1;
}
}
Expand All @@ -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) {
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;
}
}
Expand Down Expand Up @@ -605,23 +605,20 @@ static int s2250_probe(struct i2c_client *client,

/* initialize the audio */
if (write_regs(audio, aud_regs) < 0) {
printk(KERN_ERR
"s2250: error initializing audio\n");
dev_err(&client->dev, "error initializing audio\n");
i2c_unregister_device(audio);
kfree(state);
return 0;
}

if (write_regs(client, vid_regs) < 0) {
printk(KERN_ERR
"s2250: error initializing decoder\n");
dev_err(&client->dev, "error initializing decoder\n");
i2c_unregister_device(audio);
kfree(state);
return 0;
}
if (write_regs_fp(client, vid_regs_fp) < 0) {
printk(KERN_ERR
"s2250: error initializing decoder\n");
dev_err(&client->dev, "error initializing decoder\n");
i2c_unregister_device(audio);
kfree(state);
return 0;
Expand Down

0 comments on commit 053b33b

Please sign in to comment.