Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/main.c

    r215b001 r09daa8b  
    4242#include "usbhub_private.h"
    4343
    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 = {
     44
     45usb_endpoint_description_t hub_status_change_endpoint_description = {
    4946        .transfer_type = USB_TRANSFER_INTERRUPT,
    5047        .direction = USB_DIRECTION_IN,
     
    6057};
    6158
    62 static usb_endpoint_description_t *usb_hub_endpoints[] = {
    63         &hub_status_change_endpoint_description,
    64         NULL
    65 };
    66 
    6759static usb_driver_t usb_hub_driver = {
    68         .name = NAME,
    69         .ops = &usb_hub_driver_ops,
    70         .endpoints = usb_hub_endpoints
     60        .name = "usbhub",
     61        .ops = &usb_hub_driver_ops
    7162};
    7263
     
    7465int main(int argc, char *argv[])
    7566{
    76         printf(NAME ": HelenOS USB hub driver.\n");
     67        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
     68        usb_log_info("starting hub driver\n");
    7769
    78         usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME);
    7970       
     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
    8076        return usb_driver_main(&usb_hub_driver);
    8177}
Note: See TracChangeset for help on using the changeset viewer.