Changeset 93fb170c in mainline for uspace/lib/usb/src/hcdhubd.c
- Timestamp:
- 2011-01-08T18:51:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 15be932
- Parents:
- 8f748215 (diff), a523af4 (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/lib/usb/src/hcdhubd.c
r8f748215 r93fb170c 36 36 #include <usb/devreq.h> 37 37 #include <usbhc_iface.h> 38 #include <usb_iface.h> 38 39 #include <usb/descriptor.h> 39 40 #include <driver.h> … … 45 46 #include "hcdhubd_private.h" 46 47 48 49 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle) 50 { 51 assert(dev); 52 assert(dev->parent != NULL); 53 54 device_t *parent = dev->parent; 55 56 if (parent->ops && parent->ops->interfaces[USB_DEV_IFACE]) { 57 usb_iface_t *usb_iface 58 = (usb_iface_t *) parent->ops->interfaces[USB_DEV_IFACE]; 59 assert(usb_iface != NULL); 60 if (usb_iface->get_hc_handle) { 61 int rc = usb_iface->get_hc_handle(parent, handle); 62 return rc; 63 } 64 } 65 66 return ENOTSUP; 67 } 68 69 static usb_iface_t usb_iface = { 70 .get_hc_handle = usb_iface_get_hc_handle 71 }; 72 73 static device_ops_t child_ops = { 74 .interfaces[USB_DEV_IFACE] = &usb_iface 75 }; 76 47 77 /** Callback when new device is detected and must be handled by this driver. 48 78 * … … 129 159 } 130 160 child->name = child_info->name; 161 child->parent = child_info->parent; 162 child->ops = &child_ops; 131 163 132 164 match_id = create_match_id();
Note:
See TracChangeset
for help on using the changeset viewer.