Changes in uspace/drv/usbhub/main.c [215b001:dff940f8] in mainline
- File:
-
- 1 edited
-
uspace/drv/usbhub/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/main.c
r215b001 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 /** Hub status-change endpoint description. 45 * 46 * For more information see section 11.15.1 of USB 1.1 specification. 47 */ 48 static usb_endpoint_description_t hub_status_change_endpoint_description = { 49 .transfer_type = USB_TRANSFER_INTERRUPT, 50 .direction = USB_DIRECTION_IN, 51 .interface_class = USB_CLASS_HUB, 52 .interface_subclass = 0, 53 .interface_protocol = 0, 54 .flags = 0 41 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, 55 47 }; 56 48 57 58 static usb_driver_ops_t usb_hub_driver_ops = { 59 . add_device = usb_hub_add_device49 static driver_t hub_driver = { 50 .name = "usbhub", 51 .driver_ops = &hub_driver_ops 60 52 }; 61 62 static usb_endpoint_description_t *usb_hub_endpoints[] = {63 &hub_status_change_endpoint_description,64 NULL65 };66 67 static usb_driver_t usb_hub_driver = {68 .name = NAME,69 .ops = &usb_hub_driver_ops,70 .endpoints = usb_hub_endpoints71 };72 73 53 74 54 int main(int argc, char *argv[]) 75 55 { 76 printf(NAME ": HelenOS USB hub driver.\n"); 56 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 57 dprintf(USB_LOG_LEVEL_INFO, "starting hub driver"); 77 58 78 usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME); 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); 79 64 80 return usb_driver_main(&usb_hub_driver);65 return ddf_driver_main(&hub_driver); 81 66 } 82 67
Note:
See TracChangeset
for help on using the changeset viewer.
