Ignore:
File:
1 edited

Legend:

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

    r0f21c0c rdff940f8  
    3131 */
    3232
    33 #include <driver.h>
     33#include <ddf/driver.h>
    3434#include <errno.h>
    3535#include <async.h>
     36#include <stdio.h>
    3637
    3738#include "usbhub.h"
     
    5152};
    5253
    53 int usb_hub_control_loop(void * noparam){
    54         while(true){
    55                 usb_hub_check_hub_changes();
    56                 async_usleep(1000 * 1000 );/// \TODO proper number once
    57         }
    58         return 0;
    59 }
    60 
    61 
    6254int main(int argc, char *argv[])
    6355{
    64         usb_log_enable(USB_LOG_LEVEL_INFO, NAME);
    65        
     56        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
     57        dprintf(USB_LOG_LEVEL_INFO, "starting hub driver");
     58
     59        //this is probably not needed anymore
    6660        fibril_mutex_initialize(&usb_hub_list_lock);
    6761        fibril_mutex_lock(&usb_hub_list_lock);
    6862        usb_lst_init(&usb_hub_list);
    6963        fibril_mutex_unlock(&usb_hub_list_lock);
    70 
    71         fid_t fid = fibril_create(usb_hub_control_loop, NULL);
    72         if (fid == 0) {
    73                 fprintf(stderr, NAME ": failed to start monitoring fibril," \
    74                     " driver aborting.\n");
    75                 return ENOMEM;
    76         }
    77         fibril_add_ready(fid);
    78 
    79         return driver_main(&hub_driver);
     64       
     65        return ddf_driver_main(&hub_driver);
    8066}
    8167
Note: See TracChangeset for help on using the changeset viewer.