]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: cs35l41: Make cs35l41_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 20 Oct 2021 13:24:16 +0000 (15:24 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 25 Oct 2021 11:36:19 +0000 (12:36 +0100)
Up to now cs35l41_remove() returns zero unconditionally. Make it
return void instead which makes it easier to see in the callers that
there is no error to handle.

Also the return value of i2c, platform and spi remove callbacks is
ignored anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211020132416.30288-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l41-i2c.c
sound/soc/codecs/cs35l41-spi.c
sound/soc/codecs/cs35l41.c
sound/soc/codecs/cs35l41.h

index 2f3d1bd8e0463733ff9869360c484ce7b935fa4a..d5fa8d2c4a7036ab60a6b10da2a8a726cad38790 100644 (file)
@@ -75,7 +75,9 @@ static int cs35l41_i2c_remove(struct i2c_client *client)
 {
        struct cs35l41_private *cs35l41 = i2c_get_clientdata(client);
 
-       return cs35l41_remove(cs35l41);
+       cs35l41_remove(cs35l41);
+
+       return 0;
 }
 
 #ifdef CONFIG_OF
index eac64779eea89dd5fe1417859b60e6f655f175d3..90a921f726c3bdb398ff15bd7e52a673d76b5d8d 100644 (file)
@@ -100,7 +100,9 @@ static int cs35l41_spi_remove(struct spi_device *spi)
 {
        struct cs35l41_private *cs35l41 = spi_get_drvdata(spi);
 
-       return cs35l41_remove(cs35l41);
+       cs35l41_remove(cs35l41);
+
+       return 0;
 }
 
 #ifdef CONFIG_OF
index b16eb6610c0e953a958954b15ebac4bf9999207c..94ed21d7676fb0242030d7e2f09313328a84f4b6 100644 (file)
@@ -1433,13 +1433,11 @@ err:
        return ret;
 }
 
-int cs35l41_remove(struct cs35l41_private *cs35l41)
+void cs35l41_remove(struct cs35l41_private *cs35l41)
 {
        regmap_write(cs35l41->regmap, CS35L41_IRQ1_MASK1, 0xFFFFFFFF);
        regulator_bulk_disable(CS35L41_NUM_SUPPLIES, cs35l41->supplies);
        gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
-
-       return 0;
 }
 
 MODULE_DESCRIPTION("ASoC CS35L41 driver");
index 0e2639d6ef193df388b1c88087217787316d767b..6cffe8a55beb1b9789f16f06c0ef0f94250f401c 100644 (file)
@@ -770,6 +770,6 @@ struct cs35l41_private {
 
 int cs35l41_probe(struct cs35l41_private *cs35l41,
                  struct cs35l41_platform_data *pdata);
-int cs35l41_remove(struct cs35l41_private *cs35l41);
+void cs35l41_remove(struct cs35l41_private *cs35l41);
 
 #endif /*__CS35L41_H__*/