Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366711
b: refs/heads/master
c: 3190fbe
h: refs/heads/master
i:
  366709: 145b5cc
  366707: a17f839
  366703: 6d8b53e
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Mar 22, 2013
1 parent 057a714 commit b359813
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 9dc033f1eaea01ed6701b16622744c4d57f108b7
refs/heads/master: 3190fbee0176a40a8dd13200862d39f956692f63
8 changes: 5 additions & 3 deletions trunk/drivers/media/usb/em28xx/em28xx-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
struct em28xx *dev = i2c_bus->dev;
unsigned bus = i2c_bus->bus;
int addr, rc, i, byte;
u8 reg;

rc = rt_mutex_trylock(&dev->i2c_bus_lock);
if (rc < 0)
Expand All @@ -292,10 +293,11 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
/* Switch I2C bus if needed */
if (bus != dev->cur_i2c_bus) {
if (bus == 1)
dev->cur_i2c_bus |= EM2874_I2C_SECONDARY_BUS_SELECT;
reg = EM2874_I2C_SECONDARY_BUS_SELECT;
else
dev->cur_i2c_bus &= ~EM2874_I2C_SECONDARY_BUS_SELECT;
em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->cur_i2c_bus);
reg = 0;
em28xx_write_reg_bits(dev, EM28XX_R06_I2C_CLK, reg,
EM2874_I2C_SECONDARY_BUS_SELECT);
dev->cur_i2c_bus = bus;
}

Expand Down

0 comments on commit b359813

Please sign in to comment.