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


Ignore:
Timestamp:
2012-08-17T11:37:03Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1d5a540
Parents:
be2a38ad
Message:

Make ddf_dev_t and ddf_fun_t opaque. This further tighthens the DDF interface.

File:
1 edited

Legend:

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

    rbe2a38ad r56fd7cf  
    160160        mdev->usb_dev = dev;
    161161
    162         usb_log_info("Initializing mass storage `%s'.\n", dev->ddf_dev->name);
     162        usb_log_info("Initializing mass storage `%s'.\n", ddf_dev_get_name(dev->ddf_dev));
    163163        usb_log_debug("Bulk in endpoint: %d [%zuB].\n",
    164164            dev->pipes[BULK_IN_EP].pipe.endpoint_no,
     
    245245
    246246        /* Set up a connection handler. */
    247         fun->conn_handler = usbmast_bd_connection;
     247        ddf_fun_set_conn_handler(fun, usbmast_bd_connection);
    248248
    249249        usb_log_debug("Inquire...\n");
     
    252252        if (rc != EOK) {
    253253                usb_log_warning("Failed to inquire device `%s': %s.\n",
    254                     mdev->ddf_dev->name, str_error(rc));
     254                    ddf_dev_get_name(mdev->ddf_dev), str_error(rc));
    255255                rc = EIO;
    256256                goto error;
     
    259259        usb_log_info("Mass storage `%s' LUN %u: " \
    260260            "%s by %s rev. %s is %s (%s).\n",
    261             mdev->ddf_dev->name,
     261            ddf_dev_get_name(mdev->ddf_dev),
    262262            lun,
    263263            inquiry.product,
     
    272272        if (rc != EOK) {
    273273                usb_log_warning("Failed to read capacity, device `%s': %s.\n",
    274                     mdev->ddf_dev->name, str_error(rc));
     274                    ddf_dev_get_name(mdev->ddf_dev), str_error(rc));
    275275                rc = EIO;
    276276                goto error;
     
    310310        usbmast_fun_t *mfun;
    311311
    312         mfun = (usbmast_fun_t *) ((ddf_fun_t *)arg)->driver_data;
     312        mfun = (usbmast_fun_t *) ddf_fun_data_get((ddf_fun_t *)arg);
    313313        bd_conn(iid, icall, &mfun->bds);
    314314}
Note: See TracChangeset for help on using the changeset viewer.