Changeset d7ff048 in mainline for uspace/drv/bus/usb/usbmast/main.c
- Timestamp:
- 2011-10-08T13:08:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bf08ff0
- Parents:
- 8367d1d (diff), 80099c19 (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/bus/usb/usbmast/main.c
r8367d1d rd7ff048 94 94 95 95 /* Allocate softstate */ 96 mdev = calloc(1, sizeof(usbmast_dev_t));96 mdev = ddf_dev_data_alloc(dev->ddf_dev, sizeof(usbmast_dev_t)); 97 97 if (mdev == NULL) { 98 98 usb_log_error("Failed allocating softstate.\n"); 99 rc = ENOMEM; 100 goto error; 99 return ENOMEM; 101 100 } 102 101 … … 125 124 error: 126 125 /* XXX Destroy functions */ 127 if (mdev != NULL)128 free(mdev);129 126 return rc; 130 127 } … … 158 155 } 159 156 160 free(fun_name);161 162 157 /* Allocate soft state */ 163 mfun = ddf_ dev_data_alloc(mdev->ddf_dev, sizeof(usbmast_fun_t));158 mfun = ddf_fun_data_alloc(fun, sizeof(usbmast_fun_t)); 164 159 if (mfun == NULL) { 165 160 usb_log_error("Failed allocating softstate.\n"); … … 171 166 mfun->lun = lun; 172 167 173 fun_name = NULL;174 175 168 /* Set up a connection handler. */ 176 169 fun->conn_handler = usbmast_bd_connection; 177 fun->driver_data = mfun;178 170 179 171 usb_log_debug("Inquire...\n"); … … 219 211 goto error; 220 212 } 213 214 free(fun_name); 221 215 222 216 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.