mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] fixup! base: add class device support
@ 2024-06-20 12:55 Ahmad Fatoum
  2024-06-20 12:55 ` [PATCH 2/2] fixup! net: register eth class Ahmad Fatoum
  2024-07-01 12:10 ` [PATCH 1/2] fixup! base: add class device support Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2024-06-20 12:55 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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@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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-01 12:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-20 12:55 [PATCH 1/2] fixup! base: add class device support Ahmad Fatoum
2024-06-20 12:55 ` [PATCH 2/2] fixup! net: register eth class Ahmad Fatoum
2024-07-01 12:10 ` [PATCH 1/2] fixup! base: add class device support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox