Kevin Wolf ·
Currently drivers have some init function and need to actively register with the CDI library by a function call. Only afterwards they transfer control to CDI. The following patches change drivers over to a passive registration and initialization model, i.e. drivers are registered by a CDI_DRIVER macro and their initialization routine is called as a callback. Hopefully this makes it easy for Pedigree to drop the pedigree.cc file they had to add to each driver. This series looks like quite a bit of change, but the interesting part is really just a few lines of changed headers. Most changes are only mechanical conversion of drivers. Unless there are any reservations left, I'm going to commit these patches to the CDI repository soon. Kevin Wolf (4): New header cdi-osdep.h Use the CDI_DRIVER macro Call driver init function as a callback Simplify driver declarations ata/main.c | 90 +++++++++++++++++++++++++++++++------------------- e1000/main.c | 64 +++++++++++++++--------------------- ext2/main.c | 58 ++++++++++++--------------------- floppy/main.c | 70 +++++++++++++++------------------------ include/cdi-osdep.h | 35 ++++++++++++++++++++ include/cdi.h | 9 +++-- iso9660/main.c | 54 ++++++++++++------------------ ne2k/main.c | 59 +++++++++++++-------------------- pcnet/main.c | 63 +++++++++++++---------------------- ramdisk/main.c | 57 ++++++++++++-------------------- rtl8139/main.c | 63 +++++++++++++---------------------- serial/main.c | 57 ++++++++++++-------------------- sis900/main.c | 66 +++++++++++++++---------------------- 13 files changed, 329 insertions(+), 416 deletions(-) create mode 100644 include/cdi-osdep.h