From e0d29c7699de723432da268748aefe9624fc8529 Mon Sep 17 00:00:00 2001 From: David Fries Date: Wed, 15 Oct 2008 22:04:52 -0700 Subject: W1: w1_therm consistent mutex access code cleanup sl->master->mutex and dev->mutex refer to the same mutex variable, but be consistent and use the same set of pointers for the lock and unlock calls. It is less confusing (and one less pointer dereference this way). Signed-off-by: David Fries Signed-off-by: Evgeniy Polyakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/w1/slaves/w1_therm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/w1/slaves') diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index 7de99dfd11c..2c8dff9f77d 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c @@ -171,7 +171,7 @@ static ssize_t w1_therm_read(struct device *device, int i, max_trying = 10; ssize_t c = PAGE_SIZE; - mutex_lock(&sl->master->mutex); + mutex_lock(&dev->mutex); memset(rom, 0, sizeof(rom)); -- cgit v1.2.3