summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-10-14 18:31:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-10-14 18:31:28 -0700
commit4ce1b97949cbf46e847722461386170e0f709c59 (patch)
treea41b12542fa0a0a7b99c0595572b4ba10a7cfc98 /drivers
parentb7cef0d21c379669c9f620c9692b5c7c885a6311 (diff)
parent90f4a09a15239f4a819b2e90a7a0b92a75060655 (diff)
Merge tag 'i3c/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux
Pull i3c updates from Alexandre Belloni: "Not much this cycle, only two fixes for a rare event" - fix device reattach issues" * tag 'i3c/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Remove the wrong place of reattach. i3c: master: Free the old_dyn_addr when reattach.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i3c/master.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 7850287dfe7a..351c81a929a6 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1379,6 +1379,9 @@ static int i3c_master_reattach_i3c_dev(struct i3c_dev_desc *dev,
i3c_bus_set_addr_slot_status(&master->bus,
dev->info.dyn_addr,
I3C_ADDR_SLOT_I3C_DEV);
+ if (old_dyn_addr)
+ i3c_bus_set_addr_slot_status(&master->bus, old_dyn_addr,
+ I3C_ADDR_SLOT_FREE);
}
if (master->ops->reattach_i3c_dev) {
@@ -1908,10 +1911,6 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master,
i3c_master_free_i3c_dev(olddev);
}
- ret = i3c_master_reattach_i3c_dev(newdev, old_dyn_addr);
- if (ret)
- goto err_detach_dev;
-
/*
* Depending on our previous state, the expected dynamic address might
* differ: