diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-09 08:36:39 +0200 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-17 01:10:28 +0200 |
commit | cc3f87c0c7763f7aa01ade3cc532cb243422bdfe (patch) | |
tree | 249ef9e5d71afc46318d1158bf6766bde7507b16 /cpukit/libdrvmgr | |
parent | LIBPCI: corrected documentation (diff) | |
download | rtems-cc3f87c0c7763f7aa01ade3cc532cb243422bdfe.tar.bz2 |
DRVMGR: removed a goto and added comments
Diffstat (limited to 'cpukit/libdrvmgr')
-rw-r--r-- | cpukit/libdrvmgr/drvmgr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/libdrvmgr/drvmgr.c b/cpukit/libdrvmgr/drvmgr.c index ab3d54e04f..a8d7c6dca9 100644 --- a/cpukit/libdrvmgr/drvmgr.c +++ b/cpukit/libdrvmgr/drvmgr.c @@ -119,7 +119,6 @@ void drvmgr_init_update(void) goto out; mgr->initializing_objs = 1; -init_registered_buses: /* Take all buses and devices ready into the same stage * as the driver manager global level. */ @@ -170,8 +169,9 @@ init_registered_buses: /* Make sure all buses registered and ready are taken at * the same time into init level N. */ - if (bus_might_been_registered) - goto init_registered_buses; + if (bus_might_been_registered) { + level = -1; /* restart loop */ + } } /* Release bus/device initialization "Lock" */ @@ -598,6 +598,7 @@ int drvmgr_alloc_dev(struct drvmgr_dev **pdev, int extra) struct drvmgr_dev *dev; int size; + /* The extra memory "service" is aligned to 4 bytes boundary. */ size = ((sizeof(struct drvmgr_dev) + 3) & ~0x3) + extra; dev = (struct drvmgr_dev *)calloc(size, 1); if (!dev) { @@ -616,6 +617,7 @@ int drvmgr_alloc_bus(struct drvmgr_bus **pbus, int extra) struct drvmgr_bus *bus; int size; + /* The extra memory "service" is aligned to 4 bytes boundary. */ size = ((sizeof(struct drvmgr_bus) + 3) & ~0x3) + extra; bus = (struct drvmgr_bus *)calloc(size, 1); if (!bus) { |