i2c: Semaphore to mutex conversions,
PATCH 14/17 i2c: Semaphore to mutex conversions,
Content-Disposition: inline; filename=i2c-convert-semaphores-to-mutexes-3.patch
Cleanup after the semaphores to mutexes conversions in the i2c subsystem.
Signed-off-by Jean Delvare <khali at linux-fr.org>
--- drivers/i2c/busses/i2c-ali1535.c | 1 - drivers/i2c/busses/i2c-pxa.c | 2 +- drivers/i2c/busses/scx200_acb.c | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/i2c/busses/i2c-ali1535.c +0 -1
@@ -64,7 +64,6 @@#include <linux/init.h> #include <linux/mutex.h> #include <asm/io.h> -#include <asm/semaphore.h> /* ALI1535 SMBus address offsets */
drivers/i2c/busses/i2c-pxa.c +1 -1
@@ -647,7 +647,7 @@ }/* -* 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) {
drivers/i2c/busses/scx200_acb.c +5 -4
@@ -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>
@@ -74,7 +75,7 @@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;
@@ -314,7 +315,7 @@return -EINVAL ; } -down (&iface->sem); +mutex_lock (&iface->mutex); iface->address_byte = (address <<1 ) | rw; iface->command = command;
@@ -338,7 +339,7 @@ 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);
@@ -431,7 +432,7 @@ 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);
Signature · 1 line
Jean Delvare