Changeset d369b3b in mainline for uspace/drv/bus/usb/ehci/ehci_bus.c
- Timestamp:
- 2018-01-25T02:05:57Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 296d22fc
- Parents:
- b357377
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 01:52:13)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 02:05:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_bus.c
rb357377 rd369b3b 57 57 } 58 58 59 static int ehci_device_enumerate(device_t *dev) 60 { 61 ehci_bus_t *bus = (ehci_bus_t *) dev->bus; 62 return usb2_bus_device_enumerate(&bus->helper, dev); 63 } 59 64 60 65 /** Creates new hcd endpoint representation. … … 101 106 ehci_endpoint_t *ehci_ep = ehci_endpoint_get(ep); 102 107 103 const int err = usb2_bus_ ops.endpoint_register(ep);108 const int err = usb2_bus_endpoint_register(&bus->helper, ep); 104 109 if (err) 105 110 return err; … … 119 124 assert(ep); 120 125 121 usb2_bus_ ops.endpoint_unregister(ep);126 usb2_bus_endpoint_unregister(&bus->helper, ep); 122 127 hc_dequeue_endpoint(hc, ep); 123 128 /* … … 154 159 155 160 static const bus_ops_t ehci_bus_ops = { 156 .parent = &usb2_bus_ops,157 158 161 .interrupt = ehci_hc_interrupt, 159 162 .status = ehci_hc_status, 163 164 .device_enumerate = ehci_device_enumerate, 160 165 161 166 .endpoint_destroy = ehci_endpoint_destroy, … … 174 179 assert(bus); 175 180 176 usb2_bus_t *usb2_bus = (usb2_bus_t *) bus;177 181 bus_t *bus_base = (bus_t *) bus; 182 bus_init(bus_base, sizeof(device_t)); 183 bus_base->ops = &ehci_bus_ops; 178 184 179 usb2_bus_init(usb2_bus, &bandwidth_accounting_usb2); 180 bus_base->ops = &ehci_bus_ops; 185 usb2_bus_helper_init(&bus->helper, &bandwidth_accounting_usb2); 181 186 182 187 bus->hc = hc;
Note:
See TracChangeset
for help on using the changeset viewer.