]> git.dujemihanovic.xyz Git - linux.git/commitdiff
ASoC: tlv320aic3x: Make aic3x_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 19 Oct 2021 07:41:25 +0000 (09:41 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 29 Oct 2021 17:55:24 +0000 (18:55 +0100)
Up to now aic3x_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 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/20211019074125.3812513-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320aic3x-i2c.c
sound/soc/codecs/tlv320aic3x-spi.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320aic3x.h

index cd0558ed4dd47be1fa81f9152dfc3a508627c998..2f272bc3f5daf3efefe4712f7db4e7edaf3fa1f4 100644 (file)
@@ -32,7 +32,9 @@ static int aic3x_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i
 
 static int aic3x_i2c_remove(struct i2c_client *i2c)
 {
-       return aic3x_remove(&i2c->dev);
+       aic3x_remove(&i2c->dev);
+
+       return 0;
 }
 
 static const struct i2c_device_id aic3x_i2c_id[] = {
index 8c7b6bb9223f1e295efbca21dd5b5dabec769842..494e844022321c337551fc53c37db0ac1b0de0c7 100644 (file)
@@ -37,7 +37,9 @@ static int aic3x_spi_probe(struct spi_device *spi)
 
 static int aic3x_spi_remove(struct spi_device *spi)
 {
-       return aic3x_remove(&spi->dev);
+       aic3x_remove(&spi->dev);
+
+       return 0;
 }
 
 static const struct spi_device_id aic3x_spi_id[] = {
index 7731593a550973e1864e902965effbf1f5503a18..d53037b1509d0969dca2b46f3db7b495e29721b1 100644 (file)
@@ -1870,7 +1870,7 @@ err:
 }
 EXPORT_SYMBOL(aic3x_probe);
 
-int aic3x_remove(struct device *dev)
+void aic3x_remove(struct device *dev)
 {
        struct aic3x_priv *aic3x = dev_get_drvdata(dev);
 
@@ -1881,7 +1881,6 @@ int aic3x_remove(struct device *dev)
                gpio_set_value(aic3x->gpio_reset, 0);
                gpio_free(aic3x->gpio_reset);
        }
-       return 0;
 }
 EXPORT_SYMBOL(aic3x_remove);
 
index 7e0063913017201e850158a367efaadfdfccec52..14298f9e6d9b3cb723c246935ed531302439fc3b 100644 (file)
@@ -14,7 +14,7 @@ struct regmap_config;
 
 extern const struct regmap_config aic3x_regmap;
 int aic3x_probe(struct device *dev, struct regmap *regmap, kernel_ulong_t driver_data);
-int aic3x_remove(struct device *dev);
+void aic3x_remove(struct device *dev);
 
 #define AIC3X_MODEL_3X 0
 #define AIC3X_MODEL_33 1