Skip to content

Commit 356bbab

Browse files
Uwe Kleine-KönigLee Jones
authored andcommitted
mfd: stmpe: Make stmpe_remove() return void
Up to now stmpe_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 <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c39cf60 commit 356bbab

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

drivers/mfd/stmpe-i2c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ static int stmpe_i2c_remove(struct i2c_client *i2c)
9595
{
9696
struct stmpe *stmpe = dev_get_drvdata(&i2c->dev);
9797

98-
return stmpe_remove(stmpe);
98+
stmpe_remove(stmpe);
99+
100+
return 0;
99101
}
100102

101103
static const struct i2c_device_id stmpe_i2c_id[] = {

drivers/mfd/stmpe-spi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ static int stmpe_spi_remove(struct spi_device *spi)
106106
{
107107
struct stmpe *stmpe = spi_get_drvdata(spi);
108108

109-
return stmpe_remove(stmpe);
109+
stmpe_remove(stmpe);
110+
111+
return 0;
110112
}
111113

112114
static const struct of_device_id stmpe_spi_of_match[] = {

drivers/mfd/stmpe.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
14961496
return ret;
14971497
}
14981498

1499-
int stmpe_remove(struct stmpe *stmpe)
1499+
void stmpe_remove(struct stmpe *stmpe)
15001500
{
15011501
if (!IS_ERR(stmpe->vio))
15021502
regulator_disable(stmpe->vio);
@@ -1506,8 +1506,6 @@ int stmpe_remove(struct stmpe *stmpe)
15061506
__stmpe_disable(stmpe, STMPE_BLOCK_ADC);
15071507

15081508
mfd_remove_devices(stmpe->dev);
1509-
1510-
return 0;
15111509
}
15121510

15131511
#ifdef CONFIG_PM

drivers/mfd/stmpe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct stmpe_client_info {
9898
};
9999

100100
int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum);
101-
int stmpe_remove(struct stmpe *stmpe);
101+
void stmpe_remove(struct stmpe *stmpe);
102102

103103
#define STMPE_ICR_LSB_HIGH (1 << 2)
104104
#define STMPE_ICR_LSB_EDGE (1 << 1)

0 commit comments

Comments
 (0)