Skip to content

Commit 8f48629

Browse files
Tzung-Bi Shihbroonie
authored andcommitted
ASoC: dapm: remove snd_soc_dapm_put_enum_double_locked
Reverts commit 839284e ("ASoC: dapm: add snd_soc_dapm_put_enum_double_locked"). Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4b8a1ca commit 8f48629

File tree

2 files changed

+13
-43
lines changed

2 files changed

+13
-43
lines changed

include/sound/soc-dapm.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,6 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol,
392392
struct snd_ctl_elem_value *ucontrol);
393393
int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
394394
struct snd_ctl_elem_value *ucontrol);
395-
int snd_soc_dapm_put_enum_double_locked(struct snd_kcontrol *kcontrol,
396-
struct snd_ctl_elem_value *ucontrol);
397395
int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol,
398396
struct snd_ctl_elem_info *uinfo);
399397
int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,

sound/soc/soc-dapm.c

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3441,8 +3441,17 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol,
34413441
}
34423442
EXPORT_SYMBOL_GPL(snd_soc_dapm_get_enum_double);
34433443

3444-
static int __snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
3445-
struct snd_ctl_elem_value *ucontrol, int locked)
3444+
/**
3445+
* snd_soc_dapm_put_enum_double - dapm enumerated double mixer set callback
3446+
* @kcontrol: mixer control
3447+
* @ucontrol: control element information
3448+
*
3449+
* Callback to set the value of a dapm enumerated double mixer control.
3450+
*
3451+
* Returns 0 for success.
3452+
*/
3453+
int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
3454+
struct snd_ctl_elem_value *ucontrol)
34463455
{
34473456
struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
34483457
struct snd_soc_card *card = dapm->card;
@@ -3465,9 +3474,7 @@ static int __snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
34653474
mask |= e->mask << e->shift_r;
34663475
}
34673476

3468-
if (!locked)
3469-
mutex_lock_nested(&card->dapm_mutex,
3470-
SND_SOC_DAPM_CLASS_RUNTIME);
3477+
mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
34713478

34723479
change = dapm_kcontrol_set_value(kcontrol, val);
34733480

@@ -3489,50 +3496,15 @@ static int __snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
34893496
card->update = NULL;
34903497
}
34913498

3492-
if (!locked)
3493-
mutex_unlock(&card->dapm_mutex);
3499+
mutex_unlock(&card->dapm_mutex);
34943500

34953501
if (ret > 0)
34963502
soc_dpcm_runtime_update(card);
34973503

34983504
return change;
34993505
}
3500-
3501-
/**
3502-
* snd_soc_dapm_put_enum_double - dapm enumerated double mixer set callback
3503-
* @kcontrol: mixer control
3504-
* @ucontrol: control element information
3505-
*
3506-
* Callback to set the value of a dapm enumerated double mixer control.
3507-
*
3508-
* Returns 0 for success.
3509-
*/
3510-
int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
3511-
struct snd_ctl_elem_value *ucontrol)
3512-
{
3513-
return __snd_soc_dapm_put_enum_double(kcontrol, ucontrol, 0);
3514-
}
35153506
EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_double);
35163507

3517-
/**
3518-
* snd_soc_dapm_put_enum_double_locked - dapm enumerated double mixer set
3519-
* callback
3520-
* @kcontrol: mixer control
3521-
* @ucontrol: control element information
3522-
*
3523-
* Callback to set the value of a dapm enumerated double mixer control.
3524-
* Must acquire dapm_mutex before calling the function.
3525-
*
3526-
* Returns 0 for success.
3527-
*/
3528-
int snd_soc_dapm_put_enum_double_locked(struct snd_kcontrol *kcontrol,
3529-
struct snd_ctl_elem_value *ucontrol)
3530-
{
3531-
dapm_assert_locked(snd_soc_dapm_kcontrol_dapm(kcontrol));
3532-
return __snd_soc_dapm_put_enum_double(kcontrol, ucontrol, 1);
3533-
}
3534-
EXPORT_SYMBOL_GPL(snd_soc_dapm_put_enum_double_locked);
3535-
35363508
/**
35373509
* snd_soc_dapm_info_pin_switch - Info for a pin switch
35383510
*

0 commit comments

Comments
 (0)