Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68591
b: refs/heads/master
c: 567a244
h: refs/heads/master
i:
  68589: d06fac9
  68587: d53c271
  68583: 8a15f80
  68575: d22824c
v: v3
  • Loading branch information
Francis Moreau authored and Jean Delvare committed Oct 13, 2007
1 parent 4ddf25c commit e0c6b86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 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: e07bc679fbf59f1bf569d443e286911319480e87
refs/heads/master: 567a244b8b431ee8399bb43c7e65df605bdd5458
16 changes: 0 additions & 16 deletions trunk/drivers/i2c/busses/i2c-bfin-twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#define TWI_I2C_MODE_COMBINED 0x04

struct bfin_twi_iface {
struct mutex twi_lock;
int irq;
spinlock_t lock;
char read_write;
Expand Down Expand Up @@ -228,12 +227,8 @@ static int bfin_twi_master_xfer(struct i2c_adapter *adap,
if (!(bfin_read_TWI_CONTROL() & TWI_ENA))
return -ENXIO;

mutex_lock(&iface->twi_lock);

while (bfin_read_TWI_MASTER_STAT() & BUSBUSY) {
mutex_unlock(&iface->twi_lock);
yield();
mutex_lock(&iface->twi_lock);
}

ret = 0;
Expand Down Expand Up @@ -310,9 +305,6 @@ static int bfin_twi_master_xfer(struct i2c_adapter *adap,
break;
}

/* Release mutex */
mutex_unlock(&iface->twi_lock);

return ret;
}

Expand All @@ -330,12 +322,8 @@ int bfin_twi_smbus_xfer(struct i2c_adapter *adap, u16 addr,
if (!(bfin_read_TWI_CONTROL() & TWI_ENA))
return -ENXIO;

mutex_lock(&iface->twi_lock);

while (bfin_read_TWI_MASTER_STAT() & BUSBUSY) {
mutex_unlock(&iface->twi_lock);
yield();
mutex_lock(&iface->twi_lock);
}

iface->writeNum = 0;
Expand Down Expand Up @@ -502,9 +490,6 @@ int bfin_twi_smbus_xfer(struct i2c_adapter *adap, u16 addr,

rc = (iface->result >= 0) ? 0 : -1;

/* Release mutex */
mutex_unlock(&iface->twi_lock);

return rc;
}

Expand Down Expand Up @@ -555,7 +540,6 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)
struct i2c_adapter *p_adap;
int rc;

mutex_init(&(iface->twi_lock));
spin_lock_init(&(iface->lock));
init_completion(&(iface->complete));
iface->irq = IRQ_TWI;
Expand Down

0 comments on commit e0c6b86

Please sign in to comment.