* [PATCH] i2c: dummy: Drop no-op remove function
@ 2022-05-26 13:12 Uwe Kleine-König
2022-06-08 20:40 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2022-05-26 13:12 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, kernel
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(-)
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,
};
base-commit: 4b0986a3613c92f4ec1bdc7f60ec66fea135991f
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: dummy: Drop no-op remove function
2022-05-26 13:12 [PATCH] i2c: dummy: Drop no-op remove function Uwe Kleine-König
@ 2022-06-08 20:40 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-06-08 20:40 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-i2c, kernel
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
On Thu, May 26, 2022 at 03:12:13PM +0200, Uwe Kleine-König wrote:
> 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>
Nice catch! Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-08 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 13:12 [PATCH] i2c: dummy: Drop no-op remove function Uwe Kleine-König
2022-06-08 20:40 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.