Changeset d321cd7 in mainline for uspace/drv/uhci-hcd/root_hub.c
- Timestamp:
- 2011-02-11T18:12:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1824609b, edfed73
- Parents:
- 4e8e1f5 (diff), 8f198c9 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/root_hub.c
r4e8e1f5 rd321cd7 35 35 #include <errno.h> 36 36 #include <stdio.h> 37 38 37 #include <usb_iface.h> 39 40 38 #include <usb/debug.h> 41 39 42 40 #include "root_hub.h" 41 42 extern device_ops_t child_ops; 43 43 /*----------------------------------------------------------------------------*/ 44 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle)45 {46 assert(dev);47 assert(dev->parent != NULL);48 49 device_t *parent = dev->parent;50 51 if (parent->ops && parent->ops->interfaces[USB_DEV_IFACE]) {52 usb_iface_t *usb_iface53 = (usb_iface_t *) parent->ops->interfaces[USB_DEV_IFACE];54 assert(usb_iface != NULL);55 if (usb_iface->get_hc_handle) {56 int rc = usb_iface->get_hc_handle(parent, handle);57 return rc;58 }59 }60 61 return ENOTSUP;62 }63 /*----------------------------------------------------------------------------*/64 static usb_iface_t usb_iface = {65 .get_hc_handle = usb_iface_get_hc_handle66 };67 68 static device_ops_t rh_ops = {69 .interfaces[USB_DEV_IFACE] = &usb_iface70 };71 72 44 int setup_root_hub(device_t **device, device_t *hc) 73 45 { … … 108 80 hub->name = name; 109 81 hub->parent = hc; 110 hub->ops = & rh_ops;82 hub->ops = &child_ops; 111 83 112 84 *device = hub;
Note:
See TracChangeset
for help on using the changeset viewer.