Commit e499cd31 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Mark Brown says:

====================
spi: Make remove() return void

This series from Uwe Kleine-König converts the spi remove function to
return void since there is nothing useful that we can do with a failure
and it as more buses are converted it'll enable further work on the
driver core.
====================

Link: https://lore.kernel.org/r/20220228173957.1262628-2-broonie@kernel.org/


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 98fffd72 a0386bba
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -815,7 +815,7 @@ static int moxtet_probe(struct spi_device *spi)
	return 0;
}

static int moxtet_remove(struct spi_device *spi)
static void moxtet_remove(struct spi_device *spi)
{
	struct moxtet *moxtet = spi_get_drvdata(spi);

@@ -828,8 +828,6 @@ static int moxtet_remove(struct spi_device *spi)
	device_for_each_child(moxtet->dev, NULL, __unregister);

	mutex_destroy(&moxtet->lock);

	return 0;
}

static const struct of_device_id moxtet_dt_ids[] = {
+1 −4
Original line number Diff line number Diff line
@@ -267,11 +267,8 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
static int st33zp24_i2c_remove(struct i2c_client *client)
{
	struct tpm_chip *chip = i2c_get_clientdata(client);
	int ret;

	ret = st33zp24_remove(chip);
	if (ret)
		return ret;
	st33zp24_remove(chip);

	return 0;
}
+2 −7
Original line number Diff line number Diff line
@@ -381,16 +381,11 @@ static int st33zp24_spi_probe(struct spi_device *dev)
 * @param: client, the spi_device description (TPM SPI description).
 * @return: 0 in case of success.
 */
static int st33zp24_spi_remove(struct spi_device *dev)
static void st33zp24_spi_remove(struct spi_device *dev)
{
	struct tpm_chip *chip = spi_get_drvdata(dev);
	int ret;

	ret = st33zp24_remove(chip);
	if (ret)
		return ret;

	return 0;
	st33zp24_remove(chip);
}

static const struct spi_device_id st33zp24_spi_id[] = {
+1 −2
Original line number Diff line number Diff line
@@ -511,10 +511,9 @@ int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
}
EXPORT_SYMBOL(st33zp24_probe);

int st33zp24_remove(struct tpm_chip *chip)
void st33zp24_remove(struct tpm_chip *chip)
{
	tpm_chip_unregister(chip);
	return 0;
}
EXPORT_SYMBOL(st33zp24_remove);

+1 −1
Original line number Diff line number Diff line
@@ -34,5 +34,5 @@ int st33zp24_pm_resume(struct device *dev);

int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
		   struct device *dev, int irq, int io_lpcpd);
int st33zp24_remove(struct tpm_chip *chip);
void st33zp24_remove(struct tpm_chip *chip);
#endif /* __LOCAL_ST33ZP24_H__ */
Loading