Changeset ca56afa in mainline for uspace/drv/uhci-rhd/main.c


Ignore:
Timestamp:
2011-02-25T09:46:23Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d493ac17
Parents:
15b0432 (diff), a80849c (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 with /usb/development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-rhd/main.c

    r15b0432 rca56afa  
    3232 * @brief UHCI driver
    3333 */
    34 #include <driver.h>
     34#include <ddf/driver.h>
    3535#include <usb_iface.h>
    3636#include <usb/ddfiface.h>
     
    4444#define NAME "uhci-rhd"
    4545
    46 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle)
     46static int usb_iface_get_hc_handle(ddf_fun_t *fun, devman_handle_t *handle)
    4747{
    48         assert(dev);
    49         assert(dev->driver_data);
     48        assert(fun);
     49        assert(fun->driver_data);
    5050        assert(handle);
    5151
    52         *handle = ((uhci_root_hub_t*)dev->driver_data)->hc_handle;
    53         usb_log_debug("Answering HC handle: %d.\n", *handle);
     52        *handle = ((uhci_root_hub_t*)fun->driver_data)->hc_handle;
    5453
    5554        return EOK;
     
    6160};
    6261
    63 static device_ops_t uhci_rh_ops = {
     62static ddf_dev_ops_t uhci_rh_ops = {
    6463        .interfaces[USB_DEV_IFACE] = &uhci_rh_usb_iface,
    6564};
    6665
    67 static int uhci_rh_add_device(device_t *device)
     66static int uhci_rh_add_device(ddf_dev_t *device)
    6867{
    6968        if (!device)
     
    7170
    7271        usb_log_debug2("%s called device %d\n", __FUNCTION__, device->handle);
    73         device->ops = &uhci_rh_ops;
     72
     73        //device->ops = &uhci_rh_ops;
     74        (void) uhci_rh_ops;
    7475
    7576        uhci_root_hub_t *rh = malloc(sizeof(uhci_root_hub_t));
     
    104105int main(int argc, char *argv[])
    105106{
    106         usb_log_enable(USB_LOG_LEVEL_ERROR, NAME);
    107         return driver_main(&uhci_rh_driver);
     107        usb_log_enable(USB_LOG_LEVEL_INFO, NAME);
     108        return ddf_driver_main(&uhci_rh_driver);
    108109}
    109110/**
Note: See TracChangeset for help on using the changeset viewer.