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

    rbe2a38ad r56fd7cf  
    6767        }
    6868
    69         vhc_data_t *data = malloc(sizeof(vhc_data_t));
     69        vhc_data_t *data = ddf_dev_data_alloc(dev, sizeof(vhc_data_t));
    7070        if (data == NULL) {
    7171                usb_log_fatal("Failed to allocate memory.\n");
     
    8989        }
    9090
    91         hc->ops = &vhc_ops;
     91        ddf_fun_set_ops(hc, &vhc_ops);
    9292        list_initialize(&data->devices);
    9393        fibril_mutex_initialize(&data->guard);
    9494        data->hub = &virtual_hub_device;
    9595        data->hc_fun = hc;
    96 
    97         dev->driver_data = data;
    9896
    9997        rc = ddf_fun_bind(hc);
     
    116114
    117115        usb_log_info("Virtual USB host controller ready (dev %zu, hc %zu).\n",
    118             (size_t) dev->handle, (size_t) hc->handle);
    119 
    120 
     116            (size_t) ddf_dev_get_handle(dev), (size_t) ddf_fun_get_handle(hc));
    121117
    122118        rc = vhc_virtdev_plug_hub(data, data->hub, NULL);
Note: See TracChangeset for help on using the changeset viewer.