mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
i2c: ljca: drop redundant explicit adapter deletion
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> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://patch.msgid.link/20260905-ljca-v1-1-9109616ff1c6@gmail.com
This commit is contained in:
parent
25083d5c01
commit
5e6e005ffb
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user