Changeset d7ff048 in mainline for uspace/drv/bus/usb/usbmast/main.c


Ignore:
Timestamp:
2011-10-08T13:08:53Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
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.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/main.c

    r8367d1d rd7ff048  
    9494
    9595        /* Allocate softstate */
    96         mdev = calloc(1, sizeof(usbmast_dev_t));
     96        mdev = ddf_dev_data_alloc(dev->ddf_dev, sizeof(usbmast_dev_t));
    9797        if (mdev == NULL) {
    9898                usb_log_error("Failed allocating softstate.\n");
    99                 rc = ENOMEM;
    100                 goto error;
     99                return ENOMEM;
    101100        }
    102101
     
    125124error:
    126125        /* XXX Destroy functions */
    127         if (mdev != NULL)
    128                 free(mdev);
    129126        return rc;
    130127}
     
    158155        }
    159156
    160         free(fun_name);
    161 
    162157        /* 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));
    164159        if (mfun == NULL) {
    165160                usb_log_error("Failed allocating softstate.\n");
     
    171166        mfun->lun = lun;
    172167
    173         fun_name = NULL;
    174 
    175168        /* Set up a connection handler. */
    176169        fun->conn_handler = usbmast_bd_connection;
    177         fun->driver_data = mfun;
    178170
    179171        usb_log_debug("Inquire...\n");
     
    219211                goto error;
    220212        }
     213
     214        free(fun_name);
    221215
    222216        return EOK;
Note: See TracChangeset for help on using the changeset viewer.