Changeset 87037cc9 in mainline for uspace/drv/bus/usb/usbmast/main.c
- Timestamp:
- 2011-10-14T12:05:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3002434
- Parents:
- a92ce4ef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmast/main.c
ra92ce4ef r87037cc9 112 112 113 113 usb_log_debug("Get LUN count...\n"); 114 mdev->luns = usb_masstor_get_lun_count(mdev); 115 116 for (i = 0; i < mdev->luns; i++) { 114 mdev->lun_count = usb_masstor_get_lun_count(mdev); 115 mdev->luns = calloc(mdev->lun_count, sizeof(ddf_fun_t*)); 116 if (mdev->luns == NULL) { 117 rc = ENOMEM; 118 usb_log_error("Failed allocating luns table.\n"); 119 goto error; 120 } 121 122 for (i = 0; i < mdev->lun_count; i++) { 117 123 rc = usbmast_fun_create(mdev, i); 118 124 if (rc != EOK) … … 162 168 } 163 169 170 mfun->ddf_fun = fun; 164 171 mfun->mdev = mdev; 165 172 mfun->lun = lun; … … 212 219 213 220 free(fun_name); 221 mdev->luns[lun] = fun; 214 222 215 223 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.