ASoC: Avoid spk_id_get duplicate defination

Change-Id: I03e0e05434d3998e921acdfc1b36d2916a3dcd67
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
GuaiYiHu
2019-11-12 17:47:44 +08:00
committed by UtsavBalar1231
parent f8b9894ed9
commit 28575f95d8
5 changed files with 8 additions and 8 deletions

View File

@@ -215,7 +215,7 @@ static int vendor_id_get(struct snd_kcontrol *kcontrol,
ucontrol->value.integer.value[0] = VENDOR_ID_NONE;
if (cs35l41->pdata.spk_id_gpio_p)
ucontrol->value.integer.value[0] = spk_id_get(cs35l41->pdata.spk_id_gpio_p);
ucontrol->value.integer.value[0] = cs35l41_spk_id_get(cs35l41->pdata.spk_id_gpio_p);
return 0;
}
@@ -1646,7 +1646,7 @@ static struct snd_soc_codec_driver soc_codec_dev_cs35l41 = {
.idle_bias_off = true,
};
int spk_id_get(struct device_node *np)
int cs35l41_spk_id_get(struct device_node *np)
{
int id;
int state;
@@ -1742,7 +1742,7 @@ static int cs35l41_handle_of_data(struct device *dev,
"cirrus,spk-id-pin", np->full_name);
pdata->mnSpkType = VENDOR_ID_NONE;
} else {
pdata->mnSpkType = spk_id_get(pdata->spk_id_gpio_p);
pdata->mnSpkType = cs35l41_spk_id_get(pdata->spk_id_gpio_p);
}
dev_info(dev, "spk is is %d", pdata->mnSpkType);

View File

@@ -330,7 +330,7 @@ static int vendor_id_get(struct snd_kcontrol *kcontrol,
ucontrol->value.integer.value[0] = VENDOR_ID_NONE;
if (pTAS2557->spk_id_gpio_p)
ucontrol->value.integer.value[0] = spk_id_get(pTAS2557->spk_id_gpio_p);
ucontrol->value.integer.value[0] = tas2557_spk_id_get(pTAS2557->spk_id_gpio_p);
return 0;
}

View File

@@ -2051,7 +2051,7 @@ end:
return bFound;
}
int spk_id_get(struct device_node *np)
int tas2557_spk_id_get(struct device_node *np)
{
int id;
int state;
@@ -2092,7 +2092,7 @@ int tas2557_parse_dt(struct device *dev, struct tas2557_priv *pTAS2557)
"ti,spk-id-pin", np->full_name);
pTAS2557->mnSpkType = VENDOR_ID_NONE;
} else {
pTAS2557->mnSpkType = spk_id_get(pTAS2557->spk_id_gpio_p);
pTAS2557->mnSpkType = tas2557_spk_id_get(pTAS2557->spk_id_gpio_p);
}
dev_dbg(pTAS2557->dev, "spk is is %d", pTAS2557->mnSpkType);

View File

@@ -76,6 +76,6 @@ int tas2557_parse_dt(struct device *dev, struct tas2557_priv *pTAS2557);
int tas2557_get_DAC_gain(struct tas2557_priv *pTAS2557, unsigned char *pnGain);
int tas2557_set_DAC_gain(struct tas2557_priv *pTAS2557, unsigned int nGain);
int tas2557_configIRQ(struct tas2557_priv *pTAS2557);
int spk_id_get(struct device_node *np);
int tas2557_spk_id_get(struct device_node *np);
#endif /* _TAS2557_CORE_H */

View File

@@ -79,5 +79,5 @@ struct cs35l41_private {
int cs35l41_probe(struct cs35l41_private *cs35l41,
struct cs35l41_platform_data *pdata);
int spk_id_get(struct device_node *np);
int cs35l41_spk_id_get(struct device_node *np);
#endif /* __CS35L41_H */