| .. | .. |
|---|
| 319 | 319 | err = snd_power_wait(card, SNDRV_CTL_POWER_D0); |
|---|
| 320 | 320 | if (err < 0) |
|---|
| 321 | 321 | goto error; |
|---|
| 322 | + down_read(&card->controls_rwsem); |
|---|
| 322 | 323 | err = snd_ctl_elem_read(card, data); |
|---|
| 324 | + up_read(&card->controls_rwsem); |
|---|
| 323 | 325 | if (err < 0) |
|---|
| 324 | 326 | goto error; |
|---|
| 325 | 327 | err = copy_ctl_value_to_user(userdata, valuep, data, type, count); |
|---|
| .. | .. |
|---|
| 347 | 349 | err = snd_power_wait(card, SNDRV_CTL_POWER_D0); |
|---|
| 348 | 350 | if (err < 0) |
|---|
| 349 | 351 | goto error; |
|---|
| 352 | + down_write(&card->controls_rwsem); |
|---|
| 350 | 353 | err = snd_ctl_elem_write(card, file, data); |
|---|
| 354 | + up_write(&card->controls_rwsem); |
|---|
| 351 | 355 | if (err < 0) |
|---|
| 352 | 356 | goto error; |
|---|
| 353 | 357 | err = copy_ctl_value_to_user(userdata, valuep, data, type, count); |
|---|