Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23245
b: refs/heads/master
c: 3fb9a65
h: refs/heads/master
i:
  23243: eebb94c
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 91c4210 commit 4194994
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 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: 5c085d369c2c4f18942ec8951466e186366d5c78
refs/heads/master: 3fb9a65529615944138d527b70174840c95c637a
1 change: 0 additions & 1 deletion trunk/drivers/i2c/busses/i2c-ali1535.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#include <linux/init.h>
#include <linux/mutex.h>
#include <asm/io.h>
#include <asm/semaphore.h>


/* ALI1535 SMBus address offsets */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static inline void i2c_pxa_start_message(struct pxa_i2c *i2c)
}

/*
* We are protected by the adapter bus semaphore.
* We are protected by the adapter bus mutex.
*/
static int i2c_pxa_do_xfer(struct pxa_i2c *i2c, struct i2c_msg *msg, int num)
{
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/smp_lock.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <asm/io.h>
#include <asm/msr.h>

Expand Down Expand Up @@ -74,7 +75,7 @@ struct scx200_acb_iface {
struct scx200_acb_iface *next;
struct i2c_adapter adapter;
unsigned base;
struct semaphore sem;
struct mutex mutex;

/* State machine data */
enum scx200_acb_state state;
Expand Down Expand Up @@ -314,7 +315,7 @@ static s32 scx200_acb_smbus_xfer(struct i2c_adapter *adapter,
return -EINVAL;
}

down(&iface->sem);
mutex_lock(&iface->mutex);

iface->address_byte = (address << 1) | rw;
iface->command = command;
Expand All @@ -338,7 +339,7 @@ static s32 scx200_acb_smbus_xfer(struct i2c_adapter *adapter,

rc = iface->result;

up(&iface->sem);
mutex_unlock(&iface->mutex);

if (rc == 0 && size == I2C_SMBUS_WORD_DATA && rw == I2C_SMBUS_READ)
data->word = le16_to_cpu(cur_word);
Expand Down Expand Up @@ -431,7 +432,7 @@ static int __init scx200_acb_create(const char *text, int base, int index)
adapter->algo = &scx200_acb_algorithm;
adapter->class = I2C_CLASS_HWMON;

init_MUTEX(&iface->sem);
mutex_init(&iface->mutex);

snprintf(description, sizeof(description), "%s ACCESS.bus [%s]",
text, adapter->name);
Expand Down

0 comments on commit 4194994

Please sign in to comment.