Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4317827 in mainline for uspace/drv/vhc/hcd.c


Ignore:
Timestamp:
2010-12-04T14:00:41Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
36c410e
Parents:
62c9661
Message:

USB hub driver in separate task

The commit only includes changes necessary to get working (i.e. appearing
under /dev/devices) hub and VHC.

Clean-up will come later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hcd.c

    r62c9661 r4317827  
    5252#include "conn.h"
    5353
     54static device_ops_t vhc_ops = {
     55        .interfaces[USBHC_DEV_IFACE] = &vhc_iface,
     56        .default_handler = default_connection_handler
     57};
    5458
    5559static int vhc_count = 0;
    56 static int vhc_add_device(usb_hc_device_t *dev)
     60static int vhc_add_device(device_t *dev)
    5761{
    5862        /*
     
    6569        vhc_count++;
    6670
    67         dev->transfer_ops = &vhc_transfer_ops;
    68         dev->generic->ops->default_handler = default_connection_handler;
     71        dev->ops = &vhc_ops;
    6972
    7073        /*
     
    7982}
    8083
    81 static usb_hc_driver_t vhc_driver = {
     84static driver_ops_t vhc_driver_ops = {
     85        .add_device = vhc_add_device,
     86};
     87
     88static driver_t vhc_driver = {
    8289        .name = NAME,
    83         .add_hc = &vhc_add_device
     90        .driver_ops = &vhc_driver_ops
    8491};
    8592
     
    114121        sleep(4);
    115122
    116         return usb_hcd_main(&vhc_driver);
     123        return driver_main(&vhc_driver);
    117124}
    118125
Note: See TracChangeset for help on using the changeset viewer.