RFC PATCH Trivial: add update_lock to ds1621

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

This patch adds update_lock to be held during temp update

Compile tested only

Signed-off-by: Grant Coady <gcoady at gmail.com>


--- linux-2.6.12-rc1-mm2/drivers/i2c/chips/ds1621.c	2005-03-23 06:34:25.000000000 +1100
+++ linux-2.6.12-rc1-mm2x/drivers/i2c/chips/ds1621.c	2005-03-25 14:28:32.000000000 +1100
@@ -153,8 +153,10 @@
 {									\
 	struct i2c_client *client = to_i2c_client(dev);			\
 	struct ds1621_data *data = ds1621_update_client(dev);		\
+	down(&data->update_lock);					\
 	data->value = LM75_TEMP_TO_REG(simple_strtoul(buf, NULL, 10));	\
 	ds1621_write_value(client, reg, data->value);			\
+	up(&data->update_lock);						\
 	return count;							\
 }
 



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux