Changeset 86b39f7e in mainline
- Timestamp:
- 2011-01-29T07:51:08Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 62d9827
- Parents:
- 621fdaa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/iface.c
r621fdaa r86b39f7e 35 35 usb_address_t *address) 36 36 { 37 return ENOTSUP; 37 assert(dev); 38 uhci_t *hc = (uhci_t *)dev->driver_data; 39 assert(hc); 40 *address = usb_address_keeping_find(&hc->address_manager, handle); 41 if (*address <= 0) 42 return *address; 43 return EOK; 44 } 45 /*----------------------------------------------------------------------------*/ 46 static int reserve_default_address(device_t *dev) 47 { 48 assert(dev); 49 uhci_t *hc = (uhci_t *)dev->driver_data; 50 assert(hc); 51 usb_address_keeping_reserve_default(&hc->address_manager); 52 return EOK; 53 } 54 /*----------------------------------------------------------------------------*/ 55 static int release_default_address(device_t *dev) 56 { 57 assert(dev); 58 uhci_t *hc = (uhci_t *)dev->driver_data; 59 assert(hc); 60 usb_address_keeping_release_default(&hc->address_manager); 61 return EOK; 62 } 63 /*----------------------------------------------------------------------------*/ 64 static int request_address(device_t *dev, usb_address_t *address) 65 { 66 assert(dev); 67 uhci_t *hc = (uhci_t *)dev->driver_data; 68 assert(hc); 69 *address = usb_address_keeping_request(&hc->address_manager); 70 if (*address <= 0) 71 return *address; 72 return EOK; 73 } 74 /*----------------------------------------------------------------------------*/ 75 static int bind_address( 76 device_t *dev, usb_address_t address, devman_handle_t handle) 77 { 78 assert(dev); 79 uhci_t *hc = (uhci_t *)dev->driver_data; 80 assert(hc); 81 usb_address_keeping_devman_bind(&hc->address_manager, address, handle); 82 return EOK; 83 } 84 /*----------------------------------------------------------------------------*/ 85 static int release_address(device_t *dev, usb_address_t address) 86 { 87 assert(dev); 88 uhci_t *hc = (uhci_t *)dev->driver_data; 89 assert(hc); 90 usb_address_keeping_release_default(&hc->address_manager); 91 return EOK; 38 92 } 39 93 /*----------------------------------------------------------------------------*/ … … 104 158 .tell_address = get_address, 105 159 106 .reserve_default_address = NULL,107 .release_default_address = NULL,108 .request_address = NULL,109 .bind_address = NULL,110 .release_address = NULL,160 .reserve_default_address = reserve_default_address, 161 .release_default_address = release_default_address, 162 .request_address = request_address, 163 .bind_address = bind_address, 164 .release_address = release_address, 111 165 112 166 .interrupt_out = interrupt_out,
Note:
See TracChangeset
for help on using the changeset viewer.