diff options
Diffstat (limited to 'drivers/w1/masters/ds1wm.c')
-rw-r--r-- | drivers/w1/masters/ds1wm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c index a0c8965c1a79..530a2d309063 100644 --- a/drivers/w1/masters/ds1wm.c +++ b/drivers/w1/masters/ds1wm.c | |||
@@ -334,7 +334,9 @@ static void ds1wm_search(void *data, struct w1_master *master_dev, | |||
334 | return; | 334 | return; |
335 | } | 335 | } |
336 | 336 | ||
337 | mutex_lock(&master_dev->bus_mutex); | ||
337 | if (ds1wm_reset(ds1wm_data)) { | 338 | if (ds1wm_reset(ds1wm_data)) { |
339 | mutex_unlock(&master_dev->bus_mutex); | ||
338 | dev_dbg(&ds1wm_data->pdev->dev, | 340 | dev_dbg(&ds1wm_data->pdev->dev, |
339 | "pass: %d reset error (or no slaves)\n", pass); | 341 | "pass: %d reset error (or no slaves)\n", pass); |
340 | break; | 342 | break; |
@@ -387,6 +389,7 @@ static void ds1wm_search(void *data, struct w1_master *master_dev, | |||
387 | 389 | ||
388 | } | 390 | } |
389 | if (ds1wm_data->read_error) { | 391 | if (ds1wm_data->read_error) { |
392 | mutex_unlock(&master_dev->bus_mutex); | ||
390 | dev_err(&ds1wm_data->pdev->dev, | 393 | dev_err(&ds1wm_data->pdev->dev, |
391 | "pass: %d read error, retrying\n", pass); | 394 | "pass: %d read error, retrying\n", pass); |
392 | break; | 395 | break; |
@@ -400,6 +403,7 @@ static void ds1wm_search(void *data, struct w1_master *master_dev, | |||
400 | dev_dbg(&ds1wm_data->pdev->dev, | 403 | dev_dbg(&ds1wm_data->pdev->dev, |
401 | "pass: %d resetting bus\n", pass); | 404 | "pass: %d resetting bus\n", pass); |
402 | ds1wm_reset(ds1wm_data); | 405 | ds1wm_reset(ds1wm_data); |
406 | mutex_unlock(&master_dev->bus_mutex); | ||
403 | if ((r_prime & ((u64)1 << 63)) && (d & ((u64)1 << 63))) { | 407 | if ((r_prime & ((u64)1 << 63)) && (d & ((u64)1 << 63))) { |
404 | dev_err(&ds1wm_data->pdev->dev, | 408 | dev_err(&ds1wm_data->pdev->dev, |
405 | "pass: %d bus error, retrying\n", pass); | 409 | "pass: %d bus error, retrying\n", pass); |