extend --disk-module to AHCI and USB
This commit is contained in:
parent
d9675dbee3
commit
d1e517eb20
3 changed files with 55 additions and 5 deletions
|
@ -1422,18 +1422,22 @@ static struct grub_usb_controller_dev usb_controller =
|
|||
.detect_dev = grub_ohci_detect_dev
|
||||
};
|
||||
|
||||
static void *fini_hnd;
|
||||
|
||||
GRUB_MOD_INIT(ohci)
|
||||
{
|
||||
COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_td) == 32);
|
||||
COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_ed) == 16);
|
||||
grub_ohci_inithw ();
|
||||
grub_usb_controller_dev_register (&usb_controller);
|
||||
grub_loader_register_preboot_hook (grub_ohci_fini_hw, grub_ohci_restore_hw,
|
||||
GRUB_LOADER_PREBOOT_HOOK_PRIO_DISK);
|
||||
fini_hnd = grub_loader_register_preboot_hook (grub_ohci_fini_hw,
|
||||
grub_ohci_restore_hw,
|
||||
GRUB_LOADER_PREBOOT_HOOK_PRIO_DISK);
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(ohci)
|
||||
{
|
||||
grub_ohci_fini_hw (0);
|
||||
grub_loader_unregister_preboot_hook (fini_hnd);
|
||||
grub_usb_controller_dev_unregister (&usb_controller);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue