Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 205cbac0 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown
Browse files

ASoC: cs42l42: Remove unneeded gpiod NULL check



The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5771a8c0
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1898,7 +1898,6 @@ static int cs42l42_i2c_remove(struct i2c_client *i2c_client)
	snd_soc_unregister_codec(&i2c_client->dev);

	/* Hold down reset */
	if (cs42l42->reset_gpio)
	gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);

	return 0;
@@ -1913,7 +1912,6 @@ static int cs42l42_runtime_suspend(struct device *dev)
	regcache_mark_dirty(cs42l42->regmap);

	/* Hold down reset */
	if (cs42l42->reset_gpio)
	gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);

	/* remove power */
@@ -1937,7 +1935,6 @@ static int cs42l42_runtime_resume(struct device *dev)
		return ret;
	}

	if (cs42l42->reset_gpio)
	gpiod_set_value_cansleep(cs42l42->reset_gpio, 1);

	regcache_cache_only(cs42l42->regmap, false);