diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-14 10:22:55 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-13 19:39:11 +0100 |
commit | f0bd826abe0e2c04438aa8aa87386b700e6e19a8 (patch) | |
tree | c0987205064be500c23cb0afd29092d40fbfaa89 /drivers/base/driver.c | |
parent | 29ea8bcd94c7802f88dcb69a4bef29aa9283cc69 (diff) | |
download | barebox-f0bd826abe0e2c04438aa8aa87386b700e6e19a8.tar.gz barebox-f0bd826abe0e2c04438aa8aa87386b700e6e19a8.tar.xz |
device: init bus list
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@pengutronix.de>
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r-- | drivers/base/driver.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 4250fb0912..b5fe346ba4 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) |