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
/
hal
/
rng
/
rngx86.c
diff --git
a/lunaix-os/hal/rng/rngx86.c
b/lunaix-os/hal/rng/rngx86.c
index af11802a43378de27c63f40ee62cb911e6ca4629..d732f2cd75eaca742d367f68bf975bf80cd90766 100644
(file)
--- a/
lunaix-os/hal/rng/rngx86.c
+++ b/
lunaix-os/hal/rng/rngx86.c
@@
-31,16
+31,18
@@
__rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
int
pdev_randdev_init(struct device_def* devdef)
{
int
pdev_randdev_init(struct device_def* devdef)
{
- struct device* devrand = device_a
ddseq(NULL, NULL, "rand"
);
+ struct device* devrand = device_a
llocseq(NULL, NULL
);
devrand->ops.read = __rand_rd;
devrand->ops.read_page = __rand_rd_pg;
devrand->ops.read = __rand_rd;
devrand->ops.read_page = __rand_rd_pg;
+ device_register(devrand, &devdef->class, "rand");
+
return 0;
}
static struct device_def devrandx86_def = {
.name = "x86 On-Chip RNG",
return 0;
}
static struct device_def devrandx86_def = {
.name = "x86 On-Chip RNG",
- .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_RNG
, 0
),
+ .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_RNG),
.init = pdev_randdev_init
};
.init = pdev_randdev_init
};
-EXPORT_DEVICE(randdev, &devrandx86_def, load_
earlystage
);
\ No newline at end of file
+EXPORT_DEVICE(randdev, &devrandx86_def, load_
onboot
);
\ No newline at end of file