Commit 478f3890 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Vinod Koul
Browse files

soundwire: Make remove function return no value



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: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20251215174925.1327021-5-u.kleine-koenig@baylibre.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 59946373
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −3
Original line number Diff line number Diff line
@@ -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 = {
+1 −3
Original line number Diff line number Diff line
@@ -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 = {
+1 −3
Original line number Diff line number Diff line
@@ -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)
Loading