Changeset 56fd7cf in mainline for uspace/drv/bus/usb/uhcirh/main.c
- Timestamp:
- 2012-08-17T11:37:03Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1d5a540
- Parents:
- be2a38ad
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/main.c
rbe2a38ad r56fd7cf 48 48 #define NAME "uhcirh" 49 49 50 static int hc_get_my_registers( constddf_dev_t *dev,50 static int hc_get_my_registers(ddf_dev_t *dev, 51 51 uintptr_t *io_reg_address, size_t *io_reg_size); 52 52 … … 88 88 89 89 usb_log_debug2("uhci_rh_dev_add(handle=%" PRIun ")\n", 90 d evice->handle);90 ddf_dev_get_handle(device)); 91 91 92 92 uintptr_t io_regs = 0; … … 98 98 if (ret != EOK) { \ 99 99 usb_log_error(message); \ 100 if (rh) \101 free(rh); \102 100 return ret; \ 103 101 } else (void)0 … … 109 107 (void *) io_regs, io_size); 110 108 111 rh = malloc(sizeof(uhci_root_hub_t));109 rh = ddf_dev_data_alloc(device, sizeof(uhci_root_hub_t)); 112 110 ret = (rh == NULL) ? ENOMEM : EOK; 113 111 CHECK_RET_FREE_RH_RETURN(ret, … … 119 117 ret, str_error(ret)); 120 118 121 device->driver_data = rh;122 119 usb_log_info("Controlling root hub '%s' (%" PRIun ").\n", 123 d evice->name, device->handle);120 ddf_dev_get_name(device), ddf_dev_get_handle(device)); 124 121 return EOK; 125 122 } … … 133 130 */ 134 131 int hc_get_my_registers( 135 constddf_dev_t *dev, uintptr_t *io_reg_address, size_t *io_reg_size)132 ddf_dev_t *dev, uintptr_t *io_reg_address, size_t *io_reg_size) 136 133 { 137 assert(dev);138 139 134 async_sess_t *parent_sess = 140 devman_parent_device_connect(EXCHANGE_SERIALIZE, dev->handle,141 IPC_FLAG_BLOCKING);135 devman_parent_device_connect(EXCHANGE_SERIALIZE, 136 ddf_dev_get_handle(dev), IPC_FLAG_BLOCKING); 142 137 if (!parent_sess) 143 138 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.