Changeset b8622e2 in mainline for uspace/drv/usbhub/main.c


Ignore:
Timestamp:
2011-02-25T16:59:24Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a1aa20, 81c508c
Parents:
3b0fb049 (diff), dff940f8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge from smekideki: hub driver uses new api and works

File:
1 edited

Legend:

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

    r3b0fb049 rb8622e2  
    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{
    6456        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
    65        
     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 
     64       
    7965        return ddf_driver_main(&hub_driver);
    8066}
Note: See TracChangeset for help on using the changeset viewer.