/* Iterate over all controllers found by the driver. */ static int grub_usb_controller_dev_register_hook (grub_usb_controller_t dev, void *closure) { grub_usb_controller_dev_t usb = closure; dev->dev = usb; /* Enable the ports of the USB Root Hub. */ grub_usb_root_hub (dev); return 0; }
void grub_usb_controller_dev_register (grub_usb_controller_dev_t usb) { auto int iterate_hook (grub_usb_controller_t dev); /* Iterate over all controllers found by the driver. */ int iterate_hook (grub_usb_controller_t dev) { dev->dev = usb; /* Enable the ports of the USB Root Hub. */ grub_usb_root_hub (dev); return 0; }