ASoC: tas2770: Remove unused variables
Remove unused variables in the private struct and the code as these variables are initially set and then there is no additional code utilizing these variables. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200923132600.10652-6-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dd7d905206
commit
3121420cf9
2 changed files with 2 additions and 17 deletions
|
@ -249,8 +249,6 @@ static int tas2770_set_bitwidth(struct tas2770_priv *tas2770, int bitwidth)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
tas2770->channel_size = bitwidth;
|
|
||||||
|
|
||||||
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG5,
|
ret = snd_soc_component_update_bits(component, TAS2770_TDM_CFG_REG5,
|
||||||
TAS2770_TDM_CFG_REG5_VSNS_MASK |
|
TAS2770_TDM_CFG_REG5_VSNS_MASK |
|
||||||
TAS2770_TDM_CFG_REG5_50_MASK,
|
TAS2770_TDM_CFG_REG5_50_MASK,
|
||||||
|
@ -312,7 +310,6 @@ static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
tas2770->sampling_rate = samplerate;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,8 +397,6 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||||
int slots, int slot_width)
|
int slots, int slot_width)
|
||||||
{
|
{
|
||||||
struct snd_soc_component *component = dai->component;
|
struct snd_soc_component *component = dai->component;
|
||||||
struct tas2770_priv *tas2770 =
|
|
||||||
snd_soc_component_get_drvdata(component);
|
|
||||||
int left_slot, right_slot;
|
int left_slot, right_slot;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -466,7 +461,6 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
tas2770->slot_width = slot_width;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,8 +682,6 @@ static int tas2770_i2c_probe(struct i2c_client *client,
|
||||||
i2c_set_clientdata(client, tas2770);
|
i2c_set_clientdata(client, tas2770);
|
||||||
dev_set_drvdata(&client->dev, tas2770);
|
dev_set_drvdata(&client->dev, tas2770);
|
||||||
|
|
||||||
tas2770->power_state = TAS2770_POWER_SHUTDOWN;
|
|
||||||
|
|
||||||
tas2770->regmap = devm_regmap_init_i2c(client, &tas2770_i2c_regmap);
|
tas2770->regmap = devm_regmap_init_i2c(client, &tas2770_i2c_regmap);
|
||||||
if (IS_ERR(tas2770->regmap)) {
|
if (IS_ERR(tas2770->regmap)) {
|
||||||
result = PTR_ERR(tas2770->regmap);
|
result = PTR_ERR(tas2770->regmap);
|
||||||
|
@ -716,9 +708,6 @@ static int tas2770_i2c_probe(struct i2c_client *client,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tas2770->channel_size = 0;
|
|
||||||
tas2770->slot_width = 0;
|
|
||||||
|
|
||||||
result = tas2770_register_codec(tas2770);
|
result = tas2770_register_codec(tas2770);
|
||||||
if (result)
|
if (result)
|
||||||
dev_err(tas2770->dev, "Register codec failed.\n");
|
dev_err(tas2770->dev, "Register codec failed.\n");
|
||||||
|
|
|
@ -128,15 +128,11 @@
|
||||||
#define ERROR_CLASSD_PWR BIT(5)
|
#define ERROR_CLASSD_PWR BIT(5)
|
||||||
|
|
||||||
struct tas2770_priv {
|
struct tas2770_priv {
|
||||||
struct device *dev;
|
|
||||||
struct regmap *regmap;
|
|
||||||
struct snd_soc_component *component;
|
struct snd_soc_component *component;
|
||||||
int power_state;
|
|
||||||
struct gpio_desc *reset_gpio;
|
struct gpio_desc *reset_gpio;
|
||||||
struct gpio_desc *sdz_gpio;
|
struct gpio_desc *sdz_gpio;
|
||||||
int sampling_rate;
|
struct regmap *regmap;
|
||||||
int channel_size;
|
struct device *dev;
|
||||||
int slot_width;
|
|
||||||
int v_sense_slot;
|
int v_sense_slot;
|
||||||
int i_sense_slot;
|
int i_sense_slot;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue