Message ID | 20220526131213.1591909-1-u.kleine-koenig@pengutronix.de |
---|---|
State | Accepted |
Commit | 99ad11e06be8ad29abee1ec3b8b22dfe77bbabec |
Headers | show |
Series | i2c: dummy: Drop no-op remove function | expand |
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index d43db2c3876e..8ae47e0bbd67 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1023,15 +1023,9 @@ static int dummy_probe(struct i2c_client *client, return 0; } -static int dummy_remove(struct i2c_client *client) -{ - return 0; -} - static struct i2c_driver dummy_driver = { .driver.name = "dummy", .probe = dummy_probe, - .remove = dummy_remove, .id_table = dummy_id, };
A remove callback that just returns 0 is equivalent to no callback at all as can be seen in i2c_device_remove(). So simplify accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/i2c/i2c-core-base.c | 6 ------ 1 file changed, 6 deletions(-) base-commit: 4b0986a3613c92f4ec1bdc7f60ec66fea135991f