[PATCH 2/7] driver: Do not forget to remove device from active list

Sascha Hauer s.hauer at pengutronix.de
Mon Apr 4 09:09:40 EDT 2011


Otherwise the remove function will be called twice leading
to bad effects.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 lib/driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/driver.c b/lib/driver.c
index ff92e44..4c10a49 100644
--- a/lib/driver.c
+++ b/lib/driver.c
@@ -147,6 +147,7 @@ int unregister_device(struct device_d *old_dev)
 		old_dev->bus->remove(old_dev);
 
 	list_del(&old_dev->list);
+	list_del(&old_dev->active);
 
 	/* remove device from parents child list */
 	if (old_dev->parent)
-- 
1.7.2.3




More information about the barebox mailing list