Skip to content

Commit

Permalink
ASoC: cs35l41: Make cs35l41_remove() return void
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Mark Brown committed Oct 25, 2021
1 parent 03f0267 commit ca7270a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion sound/soc/codecs/cs35l41-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion sound/soc/codecs/cs35l41-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions sound/soc/codecs/cs35l41.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,13 +1433,11 @@ int cs35l41_probe(struct cs35l41_private *cs35l41,
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");
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/cs35l41.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__*/

0 comments on commit ca7270a

Please sign in to comment.