Changeset f5f0cfb in mainline for uspace/drv/bus/usb/vhc/main.c
- Timestamp:
- 2012-12-22T16:24:28Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1e2af6a9
- Parents:
- f6577d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/main.c
rf6577d9 rf5f0cfb 44 44 #include <usb/debug.h> 45 45 #include "vhcd.h" 46 #include "hub/hub.h"47 #include "hub/virthub.h"48 46 49 static usbvirt_device_t virtual_hub_device = {50 .name = "root hub",51 .ops = &hub_ops,52 .address = 053 };54 47 55 48 static ddf_dev_ops_t vhc_ops = { … … 57 50 .default_handler = default_connection_handler 58 51 }; 52 59 53 60 54 static int vhc_control_node(ddf_dev_t *dev, ddf_fun_t **fun) … … 78 72 return ret; 79 73 } 80 vhc_data_init(vhc); 81 // TODO: This limits us to single vhc instance. 82 virthub_init(&virtual_hub_device); 83 vhc->hub = &virtual_hub_device; 74 vhc_init(vhc); 84 75 return EOK; 85 76 } 86 87 77 88 78 static int vhc_dev_add(ddf_dev_t *dev) … … 111 101 /* Add virtual hub device */ 112 102 usb_address_t address = 1; 113 ret = vhc_virtdev_plug_hub(data, data->hub, NULL, address);103 ret = vhc_virtdev_plug_hub(data, &data->hub, NULL, address); 114 104 if (ret != EOK) { 115 105 usb_log_error("Failed to plug root hub: %s.\n", str_error(ret));
Note:
See TracChangeset
for help on using the changeset viewer.