[PATCH 2/8] device: init bus list

Sascha Hauer s.hauer at pengutronix.de
Thu Feb 13 05:25:29 EST 2014


bus_list is only initialized when the device has a bus, but it
needs to be initialized in unregister_device, so initialize the
list unconditionally.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/base/driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 4250fb0..b5fe346 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -154,6 +154,7 @@ int register_device(struct device_d *new_device)
 	INIT_LIST_HEAD(&new_device->cdevs);
 	INIT_LIST_HEAD(&new_device->parameters);
 	INIT_LIST_HEAD(&new_device->active);
+	INIT_LIST_HEAD(&new_device->bus_list);
 
 	if (new_device->bus) {
 		if (!new_device->parent)
-- 
1.8.5.3




More information about the barebox mailing list