aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r--sound/usb/mixer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index c2ef11ccd66a..298070e8f2d4 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -292,7 +292,7 @@ static int get_ctl_value_v1(struct usb_mixer_elem_info *cval, int request, int v
292 err = snd_usb_autoresume(cval->mixer->chip); 292 err = snd_usb_autoresume(cval->mixer->chip);
293 if (err < 0) 293 if (err < 0)
294 return -EIO; 294 return -EIO;
295 mutex_lock(&chip->shutdown_mutex); 295 down_read(&chip->shutdown_rwsem);
296 while (timeout-- > 0) { 296 while (timeout-- > 0) {
297 if (chip->shutdown) 297 if (chip->shutdown)
298 break; 298 break;
@@ -310,7 +310,7 @@ static int get_ctl_value_v1(struct usb_mixer_elem_info *cval, int request, int v
310 err = -EINVAL; 310 err = -EINVAL;
311 311
312 out: 312 out:
313 mutex_unlock(&chip->shutdown_mutex); 313 up_read(&chip->shutdown_rwsem);
314 snd_usb_autosuspend(cval->mixer->chip); 314 snd_usb_autosuspend(cval->mixer->chip);
315 return err; 315 return err;
316} 316}
@@ -337,7 +337,7 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request, int v
337 if (ret) 337 if (ret)
338 goto error; 338 goto error;
339 339
340 mutex_lock(&chip->shutdown_mutex); 340 down_read(&chip->shutdown_rwsem);
341 if (chip->shutdown) 341 if (chip->shutdown)
342 ret = -ENODEV; 342 ret = -ENODEV;
343 else { 343 else {
@@ -346,7 +346,7 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request, int v
346 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, 346 USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
347 validx, idx, buf, size); 347 validx, idx, buf, size);
348 } 348 }
349 mutex_unlock(&chip->shutdown_mutex); 349 up_read(&chip->shutdown_rwsem);
350 snd_usb_autosuspend(chip); 350 snd_usb_autosuspend(chip);
351 351
352 if (ret < 0) { 352 if (ret < 0) {
@@ -453,7 +453,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
453 err = snd_usb_autoresume(chip); 453 err = snd_usb_autoresume(chip);
454 if (err < 0) 454 if (err < 0)
455 return -EIO; 455 return -EIO;
456 mutex_lock(&chip->shutdown_mutex); 456 down_read(&chip->shutdown_rwsem);
457 while (timeout-- > 0) { 457 while (timeout-- > 0) {
458 if (chip->shutdown) 458 if (chip->shutdown)
459 break; 459 break;
@@ -471,7 +471,7 @@ int snd_usb_mixer_set_ctl_value(struct usb_mixer_elem_info *cval,
471 err = -EINVAL; 471 err = -EINVAL;
472 472
473 out: 473 out:
474 mutex_unlock(&chip->shutdown_mutex); 474 up_read(&chip->shutdown_rwsem);
475 snd_usb_autosuspend(chip); 475 snd_usb_autosuspend(chip);
476 return err; 476 return err;
477} 477}