forked from Minki/linux
ASoC: cs35l32: Remove unneeded NULL test for cs35l32->reset_gpio
It's safe to call gpiod_set_value_cansleep() with NULL desc. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
4c38b9c30f
commit
d5a78c8ea0
@ -441,7 +441,6 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client,
|
||||
if (IS_ERR(cs35l32->reset_gpio))
|
||||
return PTR_ERR(cs35l32->reset_gpio);
|
||||
|
||||
if (cs35l32->reset_gpio)
|
||||
gpiod_set_value_cansleep(cs35l32->reset_gpio, 1);
|
||||
|
||||
/* initialize codec */
|
||||
@ -536,7 +535,6 @@ static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
|
||||
snd_soc_unregister_codec(&i2c_client->dev);
|
||||
|
||||
/* Hold down reset */
|
||||
if (cs35l32->reset_gpio)
|
||||
gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
|
||||
|
||||
return 0;
|
||||
@ -551,7 +549,6 @@ static int cs35l32_runtime_suspend(struct device *dev)
|
||||
regcache_mark_dirty(cs35l32->regmap);
|
||||
|
||||
/* Hold down reset */
|
||||
if (cs35l32->reset_gpio)
|
||||
gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
|
||||
|
||||
/* remove power */
|
||||
@ -575,7 +572,6 @@ static int cs35l32_runtime_resume(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (cs35l32->reset_gpio)
|
||||
gpiod_set_value_cansleep(cs35l32->reset_gpio, 1);
|
||||
|
||||
regcache_cache_only(cs35l32->regmap, false);
|
||||
|
Loading…
Reference in New Issue
Block a user