[PATCH 1/2] fixup! base: add class device support
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Jun 20 05:55:47 PDT 2024
base: class: fix class_remove_device to not corrupt the class list
class_remove_device is supposed to remove the device from the class, not
remove the class from its devices.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/base/class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 28ae828d658a..fd7d6b2d7a29 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -21,7 +21,7 @@ int class_add_device(struct class *class, struct device *dev)
void class_remove_device(struct class *class, struct device *dev)
{
- list_del(&class->devices);
+ list_del(&dev->class_list);
}
extern struct class __barebox_class_start[];
--
2.39.2
More information about the barebox
mailing list