Changeset 8627377 in mainline for uspace/drv/ohci/main.c
- Timestamp:
- 2011-03-21T12:23:31Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ff582d47
- Parents:
- a6d1bc1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/main.c
ra6d1bc1 r8627377 48 48 49 49 static int ohci_add_device(ddf_dev_t *device); 50 static int get_hc_handle(ddf_fun_t *fun, devman_handle_t *handle) 51 { 52 assert(handle); 53 assert(fun != NULL); 54 55 *handle = fun->handle; 56 return EOK; 57 } 58 /*----------------------------------------------------------------------------*/ 59 static int get_address( 60 ddf_fun_t *fun, devman_handle_t handle, usb_address_t *address) 61 { 62 assert(fun); 63 device_keeper_t *manager = &fun_to_hc(fun)->manager; 64 usb_address_t addr = device_keeper_find(manager, handle); 65 if (addr < 0) { 66 return addr; 67 } 68 69 if (address != NULL) { 70 *address = addr; 71 } 72 73 return EOK; 74 } 50 75 /*----------------------------------------------------------------------------*/ 51 76 /** IRQ handling callback, identifies device … … 71 96 .driver_ops = &ohci_driver_ops 72 97 }; 98 /*----------------------------------------------------------------------------*/ 99 static usb_iface_t hc_usb_iface = { 100 .get_address = get_address, 101 .get_hc_handle = get_hc_handle, 102 }; 103 /*----------------------------------------------------------------------------*/ 73 104 static ddf_dev_ops_t hc_ops = { 105 .interfaces[USB_DEV_IFACE] = &hc_usb_iface, 74 106 .interfaces[USBHC_DEV_IFACE] = &hc_iface, 75 107 }; 76 77 108 /*----------------------------------------------------------------------------*/ 78 109 /** Initializes a new ddf driver instance of OHCI hcd.
Note:
See TracChangeset
for help on using the changeset viewer.