ASoC: cs35l45: Make cs35l45_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 20 May 2022 17:33:49 +0000 (19:33 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 11:38:43 +0000 (12:38 +0100)
cs35l45_remove() always returns zero. Make it return no value which
makes it easier to see in the callers that there is no error to handle.

Also the return value of i2c driver remove callbacks is ignored anyway.
This prepares making i2c remove callbacks return void, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220520173349.774366-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l45-i2c.c
sound/soc/codecs/cs35l45.c
sound/soc/codecs/cs35l45.h

index 38a4dbc9e9feadc5e199356ada8eeb10b367d85b..06c2ddffb9c53c2d69bf34da9bcb7295b7e1f5f2 100644 (file)
@@ -40,7 +40,9 @@ static int cs35l45_i2c_remove(struct i2c_client *client)
 {
        struct cs35l45_private *cs35l45 = i2c_get_clientdata(client);
 
-       return cs35l45_remove(cs35l45);
+       cs35l45_remove(cs35l45);
+
+       return 0;
 }
 
 static const struct of_device_id cs35l45_of_match[] = {
index 2367c1a4c10eb74a0367ca2f60928a1e6233b5b2..c94edfce4b720e57dc6fa7ff88724f7fecf94877 100644 (file)
@@ -665,7 +665,7 @@ err:
 }
 EXPORT_SYMBOL_NS_GPL(cs35l45_probe, SND_SOC_CS35L45);
 
-int cs35l45_remove(struct cs35l45_private *cs35l45)
+void cs35l45_remove(struct cs35l45_private *cs35l45)
 {
        pm_runtime_disable(cs35l45->dev);
 
@@ -673,8 +673,6 @@ int cs35l45_remove(struct cs35l45_private *cs35l45)
        regulator_disable(cs35l45->vdd_a);
        /* VDD_BATT must be the last to power-off */
        regulator_disable(cs35l45->vdd_batt);
-
-       return 0;
 }
 EXPORT_SYMBOL_NS_GPL(cs35l45_remove, SND_SOC_CS35L45);
 
index 4e266d19cd1cda73b23b51501525103bf35d137b..680891bcfce9a79954363cafb8204e8c34edbf4d 100644 (file)
@@ -212,6 +212,6 @@ extern const struct regmap_config cs35l45_spi_regmap;
 int cs35l45_apply_patch(struct cs35l45_private *cs43l45);
 unsigned int cs35l45_get_clk_freq_id(unsigned int freq);
 int cs35l45_probe(struct cs35l45_private *cs35l45);
-int cs35l45_remove(struct cs35l45_private *cs35l45);
+void cs35l45_remove(struct cs35l45_private *cs35l45);
 
 #endif /* CS35L45_H */