Changeset 56fd7cf in mainline for uspace/drv/bus/usb/uhcirh/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/uhcirh/main.c

    rbe2a38ad r56fd7cf  
    4848#define NAME "uhcirh"
    4949
    50 static int hc_get_my_registers(const ddf_dev_t *dev,
     50static int hc_get_my_registers(ddf_dev_t *dev,
    5151    uintptr_t *io_reg_address, size_t *io_reg_size);
    5252
     
    8888
    8989        usb_log_debug2("uhci_rh_dev_add(handle=%" PRIun ")\n",
    90             device->handle);
     90            ddf_dev_get_handle(device));
    9191
    9292        uintptr_t io_regs = 0;
     
    9898if (ret != EOK) { \
    9999        usb_log_error(message); \
    100         if (rh) \
    101                 free(rh); \
    102100        return ret; \
    103101} else (void)0
     
    109107            (void *) io_regs, io_size);
    110108
    111         rh = malloc(sizeof(uhci_root_hub_t));
     109        rh = ddf_dev_data_alloc(device, sizeof(uhci_root_hub_t));
    112110        ret = (rh == NULL) ? ENOMEM : EOK;
    113111        CHECK_RET_FREE_RH_RETURN(ret,
     
    119117            ret, str_error(ret));
    120118
    121         device->driver_data = rh;
    122119        usb_log_info("Controlling root hub '%s' (%" PRIun ").\n",
    123             device->name, device->handle);
     120            ddf_dev_get_name(device), ddf_dev_get_handle(device));
    124121        return EOK;
    125122}
     
    133130 */
    134131int hc_get_my_registers(
    135     const ddf_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)
    136133{
    137         assert(dev);
    138 
    139134        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);
    142137        if (!parent_sess)
    143138                return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.