aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/slaves/w1_bq27000.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/w1/slaves/w1_bq27000.c b/drivers/w1/slaves/w1_bq27000.c
index 6ae60aa1315b..52ad812fa1e7 100644
--- a/drivers/w1/slaves/w1_bq27000.c
+++ b/drivers/w1/slaves/w1_bq27000.c
@@ -31,8 +31,10 @@ static int w1_bq27000_read(struct device *dev, unsigned int reg)
31 u8 val; 31 u8 val;
32 struct w1_slave *sl = container_of(dev->parent, struct w1_slave, dev); 32 struct w1_slave *sl = container_of(dev->parent, struct w1_slave, dev);
33 33
34 mutex_lock(&sl->master->mutex);
34 w1_write_8(sl->master, HDQ_CMD_READ | reg); 35 w1_write_8(sl->master, HDQ_CMD_READ | reg);
35 val = w1_read_8(sl->master); 36 val = w1_read_8(sl->master);
37 mutex_unlock(&sl->master->mutex);
36 38
37 return val; 39 return val;
38} 40}