From: David Fries Date: Thu, 16 Oct 2008 05:04:52 +0000 (-0700) Subject: W1: w1_therm consistent mutex access code cleanup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0d29c7699de723432da268748aefe9624fc8529;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index 7de99dfd11c8..2c8dff9f77da 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));