git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: make pci device driver loading passive, pci bus scanner will not load them...
[lunaix-os.git]
/
lunaix-os
/
kernel
/
device
/
devdb.c
diff --git
a/lunaix-os/kernel/device/devdb.c
b/lunaix-os/kernel/device/devdb.c
index 1c9ee4c7135cca4e0e5e9deed8005ed928884536..236ac5aa33613655b17c7b361ebacd84217a5802 100644
(file)
--- a/
lunaix-os/kernel/device/devdb.c
+++ b/
lunaix-os/kernel/device/devdb.c
@@
-4,7
+4,7
@@
#include <lib/hash.h>
#include <lib/hash.h>
-#include <klibc/st
dio
.h>
+#include <klibc/st
rfmt
.h>
static DECLARE_HASHTABLE(dev_registry, 32);
static DECLARE_HASHTABLE(dev_byif, 8);
static DECLARE_HASHTABLE(dev_registry, 32);
static DECLARE_HASHTABLE(dev_byif, 8);
@@
-85,32
+85,33
@@
device_definitions_byif(int if_type)
return &dev_byif[__hashkey(dev_byif, if_type)];
}
return &dev_byif[__hashkey(dev_byif, if_type)];
}
-#define
device_load_on_stage(stage)
\
+#define
__device_load_on_stage(stage)
\
({ \
int idx = 0; \
struct device_def* devdef; \
({ \
int idx = 0; \
struct device_def* devdef; \
- ldga_foreach(dev_
ld_##stage, struct device_def*, idx, devdef)
\
+ ldga_foreach(dev_
##stage, struct device_def*, idx, devdef)
\
{ \
devdef->init(devdef); \
} \
})
{ \
devdef->init(devdef); \
} \
})
+#define device_load_on_stage(stage) __device_load_on_stage(stage)
void
void
-device_
earlystage
()
+device_
onbooot_load
()
{
{
- device_load_on_stage(
early
);
+ device_load_on_stage(
load_onboot
);
}
void
}
void
-device_
timerstage
()
+device_
postboot_load
()
{
{
- device_load_on_stage(
aftertimer
);
+ device_load_on_stage(
load_postboot
);
}
void
}
void
-device_
poststage
()
+device_
sysconf_load
()
{
{
- device_load_on_stage(
post
);
+ device_load_on_stage(
load_sysconf
);
}
static int
}
static int