Dear all:
I modified the lddbus sample bus driver in ldd3 as the attach file.
1. I add bus, ldd_bus_type, in ldd_bus.
2. I add device_driver, ldd_bus_driver, in ldd_bus.
3. then call device_register(&ldd_bus)
The module can been successfully compiled, but the kernel panic will
show while insert the module.
(the kernel is dead totally such that I cannot attach the kernel log
file. BTW, will someone tell me how to dump this kind of log?)

I even try device_add(&ldd_bus), as I marked in the source code but it
still fail.
This inspiration comes from usb-host contrller driver.
( The usb hub device is allocated and initialized the bus and
device_driver by usb_alloc_dev located at core/usb.c.
Then it call device_add (&udev->dev) at usb_new_device located at core/hub.c)

Could someone tell me where it goes wrong?
appreciate your help,
vichy

Attachment: lddbus.c
Description: Binary data

Reply via email to