]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soundwire: Make remove function return no value
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 15 Dec 2025 17:49:25 +0000 (18:49 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Dec 2025 06:42:49 +0000 (12:12 +0530)
All remove functions return zero and the driver core ignores any other
returned value (just emits a warning about it being ignored). So make all
remove callbacks return void instead of an ignored int. This is in line
with most other subsystems.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20251215174925.1327021-5-u.kleine-koenig@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
25 files changed:
drivers/soundwire/bus_type.c
include/linux/soundwire/sdw.h
sound/soc/codecs/cs35l56-sdw.c
sound/soc/codecs/cs42l42-sdw.c
sound/soc/codecs/max98373-sdw.c
sound/soc/codecs/pm4125-sdw.c
sound/soc/codecs/rt1017-sdca-sdw.c
sound/soc/codecs/rt1308-sdw.c
sound/soc/codecs/rt1316-sdw.c
sound/soc/codecs/rt1318-sdw.c
sound/soc/codecs/rt1320-sdw.c
sound/soc/codecs/rt5682-sdw.c
sound/soc/codecs/rt700-sdw.c
sound/soc/codecs/rt711-sdca-sdw.c
sound/soc/codecs/rt711-sdw.c
sound/soc/codecs/rt712-sdca-dmic.c
sound/soc/codecs/rt712-sdca-sdw.c
sound/soc/codecs/rt715-sdca-sdw.c
sound/soc/codecs/rt715-sdw.c
sound/soc/codecs/rt721-sdca-sdw.c
sound/soc/codecs/rt722-sdca-sdw.c
sound/soc/codecs/tas2783-sdw.c
sound/soc/codecs/wcd937x-sdw.c
sound/soc/codecs/wcd938x-sdw.c
sound/soc/codecs/wcd939x-sdw.c

index 91e70cb46fb575f3bb8d64e465e35f034904c914..c40de98f1485606f733eaca2bef474447ce6b43c 100644 (file)
@@ -168,7 +168,6 @@ static int sdw_drv_remove(struct device *dev)
 {
        struct sdw_slave *slave = dev_to_sdw_dev(dev);
        struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
-       int ret = 0;
 
        mutex_lock(&slave->sdw_dev_lock);
 
@@ -177,11 +176,11 @@ static int sdw_drv_remove(struct device *dev)
        mutex_unlock(&slave->sdw_dev_lock);
 
        if (drv->remove)
-               ret = drv->remove(slave);
+               drv->remove(slave);
 
        ida_free(&slave->bus->slave_ida, slave->index);
 
-       return ret;
+       return 0;
 }
 
 static void sdw_drv_shutdown(struct device *dev)
index e6a3476bcef1ae99973728690d32bd4e6a73e2a3..f462717acf2062ff48b2be12bde0a81a3a836e74 100644 (file)
@@ -705,7 +705,7 @@ struct sdw_master_device {
 
 struct sdw_driver {
        int (*probe)(struct sdw_slave *sdw, const struct sdw_device_id *id);
-       int (*remove)(struct sdw_slave *sdw);
+       void (*remove)(struct sdw_slave *sdw);
        void (*shutdown)(struct sdw_slave *sdw);
 
        const struct sdw_device_id *id_table;
index 42d24ac2977fc8f5b814c3e0e41a3507b4758337..30b3192d6ce9b9bd3d12e2c9dd9284e5ccbe081b 100644 (file)
@@ -554,7 +554,7 @@ static int cs35l56_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi
        return 0;
 }
 
-static int cs35l56_sdw_remove(struct sdw_slave *peripheral)
+static void cs35l56_sdw_remove(struct sdw_slave *peripheral)
 {
        struct cs35l56_private *cs35l56 = dev_get_drvdata(&peripheral->dev);
 
@@ -566,8 +566,6 @@ static int cs35l56_sdw_remove(struct sdw_slave *peripheral)
        sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF);
 
        cs35l56_remove(cs35l56);
-
-       return 0;
 }
 
 static const struct dev_pm_ops cs35l56_sdw_pm = {
index f837c7eff10b397a6522a78cfd9b2cee05b4d9e3..d5999ad9ff9b484714643eb3cd9ed57e971906cd 100644 (file)
@@ -585,14 +585,12 @@ static int cs42l42_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi
        return 0;
 }
 
-static int cs42l42_sdw_remove(struct sdw_slave *peripheral)
+static void cs42l42_sdw_remove(struct sdw_slave *peripheral)
 {
        struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);
 
        cs42l42_common_remove(cs42l42);
        pm_runtime_disable(cs42l42->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops cs42l42_sdw_pm = {
index 88ff215f52b34980200907c68629855a23f3120d..16673440218cb55c1272b91e4513d5375675504f 100644 (file)
@@ -839,11 +839,9 @@ static int max98373_sdw_probe(struct sdw_slave *slave,
        return max98373_init(slave, regmap);
 }
 
-static int max98373_sdw_remove(struct sdw_slave *slave)
+static void max98373_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 #if defined(CONFIG_OF)
index 3167b38e2876e67cdab7c02baf6f94dad72b0151..1c612ae4a4b277d23b62a61b3f3f8b109ca24df2 100644 (file)
@@ -436,13 +436,11 @@ static int pm4125_probe(struct sdw_slave *pdev, const struct sdw_device_id *id)
        return 0;
 }
 
-static int pm4125_remove(struct sdw_slave *pdev)
+static void pm4125_remove(struct sdw_slave *pdev)
 {
        struct device *dev = &pdev->dev;
 
        component_del(dev, &wcd_sdw_component_ops);
-
-       return 0;
 }
 
 static const struct sdw_device_id pm4125_slave_id[] = {
index a9c000876be8b63612598cc125711ccc4be7399d..148b36173a2573bd97ce23d1cdc66de731903949 100644 (file)
@@ -741,14 +741,12 @@ static int rt1017_sdca_sdw_probe(struct sdw_slave *slave,
        return rt1017_sdca_init(&slave->dev, regmap, slave);
 }
 
-static int rt1017_sdca_sdw_remove(struct sdw_slave *slave)
+static void rt1017_sdca_sdw_remove(struct sdw_slave *slave)
 {
        struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(&slave->dev);
 
        if (rt1017->first_hw_init)
                pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt1017_sdca_id[] = {
index b6c224832a4311439aa8fb6546a9e37689864fdc..e077d096bc239c0f2f294a919df699d90fa6c654 100644 (file)
@@ -739,11 +739,9 @@ static int rt1308_sdw_probe(struct sdw_slave *slave,
        return rt1308_sdw_init(&slave->dev, regmap, slave);
 }
 
-static int rt1308_sdw_remove(struct sdw_slave *slave)
+static void rt1308_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt1308_id[] = {
index 01a9773988646486c15d9d8c6062dbe7fbe74b3d..20fc1579eb9cf2f6beecb2c8a6cfc5a5c5943cbc 100644 (file)
@@ -716,11 +716,9 @@ static int rt1316_sdw_probe(struct sdw_slave *slave,
        return rt1316_sdw_init(&slave->dev, regmap, slave);
 }
 
-static int rt1316_sdw_remove(struct sdw_slave *slave)
+static void rt1316_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt1316_id[] = {
index 70db5450d6d293f67fade4a0145ec6fe017ffcc1..d28f1afe68f1848c4addd43633d25a5ae16632f3 100644 (file)
@@ -793,11 +793,9 @@ static int rt1318_sdw_probe(struct sdw_slave *slave,
        return rt1318_sdw_init(&slave->dev, regmap, slave);
 }
 
-static int rt1318_sdw_remove(struct sdw_slave *slave)
+static void rt1318_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt1318_id[] = {
index e3f9b03df3aaeb065d142aef1aaabb2bf6cc06b0..d03e8dbd0cdaa3d8b336c9ffeb753b338761bb65 100644 (file)
@@ -1740,11 +1740,9 @@ static int rt1320_sdw_probe(struct sdw_slave *slave,
        return rt1320_sdw_init(&slave->dev, regmap, mbq_regmap, slave);
 }
 
-static int rt1320_sdw_remove(struct sdw_slave *slave)
+static void rt1320_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 /*
index 055bea0a4a3ba4207697e59ca13475b092f029d6..fc464538ceffb0024102fa9c2c52a1f6471d0b1b 100644 (file)
@@ -690,7 +690,7 @@ static int rt5682_sdw_probe(struct sdw_slave *slave,
        return rt5682_sdw_init(&slave->dev, regmap, slave);
 }
 
-static int rt5682_sdw_remove(struct sdw_slave *slave)
+static void rt5682_sdw_remove(struct sdw_slave *slave)
 {
        struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev);
 
@@ -698,8 +698,6 @@ static int rt5682_sdw_remove(struct sdw_slave *slave)
                cancel_delayed_work_sync(&rt5682->jack_detect_work);
 
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt5682_id[] = {
index 44543c0da17724977bf479fbc58e372f305a3ae9..9ce36a66fae1d1f87ca93db1aee07f170f098970 100644 (file)
@@ -455,7 +455,7 @@ static int rt700_sdw_probe(struct sdw_slave *slave,
        return rt700_init(&slave->dev, sdw_regmap, regmap, slave);
 }
 
-static int rt700_sdw_remove(struct sdw_slave *slave)
+static void rt700_sdw_remove(struct sdw_slave *slave)
 {
        struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev);
 
@@ -465,8 +465,6 @@ static int rt700_sdw_remove(struct sdw_slave *slave)
        }
 
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt700_id[] = {
index 6eb05871db3792a934ccc9dbdef61c68d6820b93..49dacceddf81502e74e3a65758713023f4e4f8dc 100644 (file)
@@ -365,7 +365,7 @@ static int rt711_sdca_sdw_probe(struct sdw_slave *slave,
        return rt711_sdca_init(&slave->dev, regmap, mbq_regmap, slave);
 }
 
-static int rt711_sdca_sdw_remove(struct sdw_slave *slave)
+static void rt711_sdca_sdw_remove(struct sdw_slave *slave)
 {
        struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev);
 
@@ -378,8 +378,6 @@ static int rt711_sdca_sdw_remove(struct sdw_slave *slave)
 
        mutex_destroy(&rt711->calibrate_mutex);
        mutex_destroy(&rt711->disable_irq_lock);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt711_sdca_id[] = {
index 93a5a89a96b1e1b947adb2433561a3ffacb9c9dd..72ddf4cebdf366eb2f581d2c39f2442ec014b6ca 100644 (file)
@@ -458,7 +458,7 @@ static int rt711_sdw_probe(struct sdw_slave *slave,
        return rt711_init(&slave->dev, sdw_regmap, regmap, slave);
 }
 
-static int rt711_sdw_remove(struct sdw_slave *slave)
+static void rt711_sdw_remove(struct sdw_slave *slave)
 {
        struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev);
 
@@ -472,8 +472,6 @@ static int rt711_sdw_remove(struct sdw_slave *slave)
 
        mutex_destroy(&rt711->calibrate_mutex);
        mutex_destroy(&rt711->disable_irq_lock);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt711_id[] = {
index 2928649e80e4ed17a546745d92c2ef15ebd383eb..4d83544ef2049ec85552e63e1284a4dfc171b0db 100644 (file)
@@ -960,11 +960,9 @@ static int rt712_sdca_dmic_sdw_probe(struct sdw_slave *slave,
        return rt712_sdca_dmic_init(&slave->dev, regmap, mbq_regmap, slave);
 }
 
-static int rt712_sdca_dmic_sdw_remove(struct sdw_slave *slave)
+static void rt712_sdca_dmic_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static struct sdw_driver rt712_sdca_dmic_sdw_driver = {
index ea07131edfa268342c4e0a14152b20fdba6fef15..8c82887174db29452a6a3ed0a5864987234be5b3 100644 (file)
@@ -374,7 +374,7 @@ static int rt712_sdca_sdw_probe(struct sdw_slave *slave,
        return rt712_sdca_init(&slave->dev, regmap, mbq_regmap, slave);
 }
 
-static int rt712_sdca_sdw_remove(struct sdw_slave *slave)
+static void rt712_sdca_sdw_remove(struct sdw_slave *slave)
 {
        struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev);
 
@@ -387,8 +387,6 @@ static int rt712_sdca_sdw_remove(struct sdw_slave *slave)
 
        mutex_destroy(&rt712->calibrate_mutex);
        mutex_destroy(&rt712->disable_irq_lock);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt712_sdca_id[] = {
index ce7d8955efc3535dd52b11581f9f884b7c2faf60..968bc183b8d8cea15f0506779664980e8538f611 100644 (file)
@@ -191,11 +191,9 @@ static int rt715_sdca_sdw_probe(struct sdw_slave *slave,
        return rt715_sdca_init(&slave->dev, mbq_regmap, regmap, slave);
 }
 
-static int rt715_sdca_sdw_remove(struct sdw_slave *slave)
+static void rt715_sdca_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt715_sdca_id[] = {
index a3df4bbedf864b0f54f43fd146686c6ad0223044..49c91d015be4d32f085f61e721b92054294ba44e 100644 (file)
@@ -471,11 +471,9 @@ static int rt715_sdw_probe(struct sdw_slave *slave,
        return rt715_init(&slave->dev, sdw_regmap, regmap, slave);
 }
 
-static int rt715_sdw_remove(struct sdw_slave *slave)
+static void rt715_sdw_remove(struct sdw_slave *slave)
 {
        pm_runtime_disable(&slave->dev);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt715_id[] = {
index 4d8a12b13015e49db7824a0eab4bc5f8e966e874..6eb8512975b85b9fd489492d04890bc3c5839fc1 100644 (file)
@@ -415,7 +415,7 @@ static int rt721_sdca_sdw_probe(struct sdw_slave *slave,
        return rt721_sdca_init(&slave->dev, regmap, mbq_regmap, slave);
 }
 
-static int rt721_sdca_sdw_remove(struct sdw_slave *slave)
+static void rt721_sdca_sdw_remove(struct sdw_slave *slave)
 {
        struct rt721_sdca_priv *rt721 = dev_get_drvdata(&slave->dev);
 
@@ -429,8 +429,6 @@ static int rt721_sdca_sdw_remove(struct sdw_slave *slave)
 
        mutex_destroy(&rt721->calibrate_mutex);
        mutex_destroy(&rt721->disable_irq_lock);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt721_sdca_id[] = {
index a0f5601a262aabcfc77b0641d3a50c914064960e..0a5b3ffa90daf2464af832f68e1ad1ebd17ab781 100644 (file)
@@ -428,7 +428,7 @@ static int rt722_sdca_sdw_probe(struct sdw_slave *slave,
        return rt722_sdca_init(&slave->dev, regmap, slave);
 }
 
-static int rt722_sdca_sdw_remove(struct sdw_slave *slave)
+static void rt722_sdca_sdw_remove(struct sdw_slave *slave)
 {
        struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev);
 
@@ -442,8 +442,6 @@ static int rt722_sdca_sdw_remove(struct sdw_slave *slave)
 
        mutex_destroy(&rt722->calibrate_mutex);
        mutex_destroy(&rt722->disable_irq_lock);
-
-       return 0;
 }
 
 static const struct sdw_device_id rt722_sdca_id[] = {
index 43b779873b93c7d7785845dbad2083e9ebc93fca..0b07981c3f2cc751d925c9681487454ed0db2200 100644 (file)
@@ -1310,7 +1310,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral,
        return tas_init(tas_dev);
 }
 
-static s32 tas_sdw_remove(struct sdw_slave *peripheral)
+static void tas_sdw_remove(struct sdw_slave *peripheral)
 {
        struct tas2783_prv *tas_dev = dev_get_drvdata(&peripheral->dev);
 
@@ -1319,8 +1319,6 @@ static s32 tas_sdw_remove(struct sdw_slave *peripheral)
        mutex_destroy(&tas_dev->calib_lock);
        mutex_destroy(&tas_dev->pde_lock);
        dev_set_drvdata(&peripheral->dev, NULL);
-
-       return 0;
 }
 
 static const struct sdw_device_id tas_sdw_id[] = {
index 1878d67e3fa109121a7ebf0d9467696c640b09f8..7a18bed7f3471d7ff29e2f028181eea238c48829 100644 (file)
@@ -1056,13 +1056,11 @@ static int wcd9370_probe(struct sdw_slave *pdev,
        return 0;
 }
 
-static int wcd9370_remove(struct sdw_slave *pdev)
+static void wcd9370_remove(struct sdw_slave *pdev)
 {
        struct device *dev = &pdev->dev;
 
        component_del(dev, &wcd_sdw_component_ops);
-
-       return 0;
 }
 
 static const struct sdw_device_id wcd9370_slave_id[] = {
index 8c8f39d04972344b94c0be374007867eb1cbbb05..0f0cc0ac3056ec404426edee5f66281fb164a226 100644 (file)
@@ -1217,13 +1217,11 @@ static int wcd9380_probe(struct sdw_slave *pdev,
        return 0;
 }
 
-static int wcd9380_remove(struct sdw_slave *pdev)
+static void wcd9380_remove(struct sdw_slave *pdev)
 {
        struct device *dev = &pdev->dev;
 
        component_del(dev, &wcd_sdw_component_ops);
-
-       return 0;
 }
 
 static const struct sdw_device_id wcd9380_slave_id[] = {
index da342a0c95a52bc9a872cfac23d7a874c7efc633..965c768e7995c2829e06e588b5113443d657af3c 100644 (file)
@@ -1414,7 +1414,7 @@ err_free_regmap:
        return ret;
 }
 
-static int wcd9390_remove(struct sdw_slave *pdev)
+static void wcd9390_remove(struct sdw_slave *pdev)
 {
        struct device *dev = &pdev->dev;
        struct wcd939x_sdw_priv *wcd = dev_get_drvdata(dev);
@@ -1423,8 +1423,6 @@ static int wcd9390_remove(struct sdw_slave *pdev)
 
        if (wcd->regmap)
                regmap_exit(wcd->regmap);
-
-       return 0;
 }
 
 static const struct sdw_device_id wcd9390_slave_id[] = {