Changes in uspace/drv/usbhub/main.c [09daa8b:dff940f8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
r09daa8b rdff940f8 36 36 #include <stdio.h> 37 37 38 #include <usb/devdrv.h>39 #include <usb/classes/classes.h>40 41 38 #include "usbhub.h" 42 39 #include "usbhub_private.h" 43 40 44 41 45 usb_endpoint_description_t hub_status_change_endpoint_description = { 46 .transfer_type = USB_TRANSFER_INTERRUPT, 47 .direction = USB_DIRECTION_IN, 48 .interface_class = USB_CLASS_HUB, 49 .interface_subclass = 0, 50 .interface_protocol = 0, 51 .flags = 0 42 usb_general_list_t usb_hub_list; 43 fibril_mutex_t usb_hub_list_lock; 44 45 static driver_ops_t hub_driver_ops = { 46 .add_device = usb_add_hub_device, 52 47 }; 53 48 54 55 static usb_driver_ops_t usb_hub_driver_ops = { 56 . add_device = usb_hub_add_device49 static driver_t hub_driver = { 50 .name = "usbhub", 51 .driver_ops = &hub_driver_ops 57 52 }; 58 59 static usb_driver_t usb_hub_driver = {60 .name = "usbhub",61 .ops = &usb_hub_driver_ops62 };63 64 53 65 54 int main(int argc, char *argv[]) 66 55 { 67 56 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 68 usb_log_info("starting hub driver\n");57 dprintf(USB_LOG_LEVEL_INFO, "starting hub driver"); 69 58 59 //this is probably not needed anymore 60 fibril_mutex_initialize(&usb_hub_list_lock); 61 fibril_mutex_lock(&usb_hub_list_lock); 62 usb_lst_init(&usb_hub_list); 63 fibril_mutex_unlock(&usb_hub_list_lock); 70 64 71 usb_hub_driver.endpoints = (usb_endpoint_description_t**) 72 malloc(2 * sizeof(usb_endpoint_description_t*)); 73 usb_hub_driver.endpoints[0] = &hub_status_change_endpoint_description; 74 usb_hub_driver.endpoints[1] = NULL; 75 76 return usb_driver_main(&usb_hub_driver); 65 return ddf_driver_main(&hub_driver); 77 66 } 78 67
Note:
See TracChangeset
for help on using the changeset viewer.