mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] fixup! base: add class device support
Date: Thu, 20 Jun 2024 14:55:47 +0200	[thread overview]
Message-ID: <20240620125548.464201-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2024-06-20 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 12:55 Ahmad Fatoum [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240620125548.464201-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox