* [PATCH] i2c: ljca: drop redundant explicit adapter deletion
@ 2026-09-05 13:25 Felix Gu
2026-09-07 8:40 ` Sakari Ailus
2026-09-16 7:28 ` Andi Shyti
0 siblings, 2 replies; 3+ messages in thread
From: Felix Gu @ 2026-09-05 13:25 UTC (permalink / raw)
To: Lixu Zhang, Sakari Ailus, Andi Shyti; +Cc: linux-i2c, linux-kernel, Felix Gu
This driver uses devm_i2c_add_adapter(), so manual i2c_del_adapter()
in remove() is unnecessary.
Remove ljca_i2c_remove() along with the now unneeded
auxiliary_setdrvdata().
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/i2c/busses/i2c-ljca.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-ljca.c b/drivers/i2c/busses/i2c-ljca.c
index 93274f0c2d72..da3370968c8e 100644
--- a/drivers/i2c/busses/i2c-ljca.c
+++ b/drivers/i2c/busses/i2c-ljca.c
@@ -297,7 +297,6 @@ static int ljca_i2c_probe(struct auxiliary_device *auxdev,
device_set_node(&ljca_i2c->adap.dev, dev_fwnode(&auxdev->dev));
i2c_set_adapdata(&ljca_i2c->adap, ljca_i2c);
- auxiliary_set_drvdata(auxdev, ljca_i2c);
ret = ljca_i2c_init(ljca_i2c, ljca_i2c->i2c_info->id);
if (ret)
@@ -315,13 +314,6 @@ static int ljca_i2c_probe(struct auxiliary_device *auxdev,
return 0;
}
-static void ljca_i2c_remove(struct auxiliary_device *auxdev)
-{
- struct ljca_i2c_dev *ljca_i2c = auxiliary_get_drvdata(auxdev);
-
- i2c_del_adapter(&ljca_i2c->adap);
-}
-
static const struct auxiliary_device_id ljca_i2c_id_table[] = {
{ "usb_ljca.ljca-i2c", 0 },
{ /* sentinel */ }
@@ -330,7 +322,6 @@ MODULE_DEVICE_TABLE(auxiliary, ljca_i2c_id_table);
static struct auxiliary_driver ljca_i2c_driver = {
.probe = ljca_i2c_probe,
- .remove = ljca_i2c_remove,
.id_table = ljca_i2c_id_table,
};
module_auxiliary_driver(ljca_i2c_driver);
---
base-commit: 9d80aa4617b32f5054c5aa471d06b66704854935
change-id: 20260905-ljca-233024075e83
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] i2c: ljca: drop redundant explicit adapter deletion
2026-09-05 13:25 [PATCH] i2c: ljca: drop redundant explicit adapter deletion Felix Gu
@ 2026-09-07 8:40 ` Sakari Ailus
2026-09-16 7:28 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2026-09-07 8:40 UTC (permalink / raw)
To: Felix Gu; +Cc: Lixu Zhang, Andi Shyti, linux-i2c, linux-kernel
On Sat, Sep 05, 2026 at 09:25:15PM +0800, Felix Gu wrote:
> This driver uses devm_i2c_add_adapter(), so manual i2c_del_adapter()
> in remove() is unnecessary.
>
> Remove ljca_i2c_remove() along with the now unneeded
> auxiliary_setdrvdata().
>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Thanks!
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
I think you should also have:
Fixes: bfd3824c8808 ("i2c: Add support for Intel LJCA USB I2C driver")
Cc: stable@vger.kernel.org
> ---
> drivers/i2c/busses/i2c-ljca.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-ljca.c b/drivers/i2c/busses/i2c-ljca.c
> index 93274f0c2d72..da3370968c8e 100644
> --- a/drivers/i2c/busses/i2c-ljca.c
> +++ b/drivers/i2c/busses/i2c-ljca.c
> @@ -297,7 +297,6 @@ static int ljca_i2c_probe(struct auxiliary_device *auxdev,
> device_set_node(&ljca_i2c->adap.dev, dev_fwnode(&auxdev->dev));
>
> i2c_set_adapdata(&ljca_i2c->adap, ljca_i2c);
> - auxiliary_set_drvdata(auxdev, ljca_i2c);
>
> ret = ljca_i2c_init(ljca_i2c, ljca_i2c->i2c_info->id);
> if (ret)
> @@ -315,13 +314,6 @@ static int ljca_i2c_probe(struct auxiliary_device *auxdev,
> return 0;
> }
>
> -static void ljca_i2c_remove(struct auxiliary_device *auxdev)
> -{
> - struct ljca_i2c_dev *ljca_i2c = auxiliary_get_drvdata(auxdev);
> -
> - i2c_del_adapter(&ljca_i2c->adap);
> -}
> -
> static const struct auxiliary_device_id ljca_i2c_id_table[] = {
> { "usb_ljca.ljca-i2c", 0 },
> { /* sentinel */ }
> @@ -330,7 +322,6 @@ MODULE_DEVICE_TABLE(auxiliary, ljca_i2c_id_table);
>
> static struct auxiliary_driver ljca_i2c_driver = {
> .probe = ljca_i2c_probe,
> - .remove = ljca_i2c_remove,
> .id_table = ljca_i2c_id_table,
> };
> module_auxiliary_driver(ljca_i2c_driver);
>
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] i2c: ljca: drop redundant explicit adapter deletion
2026-09-05 13:25 [PATCH] i2c: ljca: drop redundant explicit adapter deletion Felix Gu
2026-09-07 8:40 ` Sakari Ailus
@ 2026-09-16 7:28 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Andi Shyti @ 2026-09-16 7:28 UTC (permalink / raw)
To: Felix Gu; +Cc: Lixu Zhang, Sakari Ailus, linux-i2c, linux-kernel
Hi Felix,
On Sat, Sep 05, 2026 at 09:25:15PM +0800, Felix Gu wrote:
> This driver uses devm_i2c_add_adapter(), so manual i2c_del_adapter()
> in remove() is unnecessary.
>
> Remove ljca_i2c_remove() along with the now unneeded
> auxiliary_setdrvdata().
>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
merged to i2c/i2c-fixes.
Thanks,
Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-16 7:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-05 13:25 [PATCH] i2c: ljca: drop redundant explicit adapter deletion Felix Gu
2026-09-07 8:40 ` Sakari Ailus
2026-09-16 7:28 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®