Changeset a799708 in mainline for uspace/drv/bus/usb/ohci/main.c


Ignore:
Timestamp:
2015-07-04T01:49:47Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d51ba359
Parents:
8d7552c
Message:

ehci,ohci,uhci: Switch to generic hc drv initialization function

File:
1 edited

Legend:

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

    r8d7552c ra799708  
    7474}
    7575
     76static const ddf_hc_driver_t ohci_hc_driver = {
     77        .hc_speed = USB_SPEED_FULL,
     78        .irq_code_gen = ohci_hc_gen_irq_code,
     79        .init = ohci_driver_init,
     80        .fini = ohci_driver_fini,
     81        .name = "OHCI"
     82};
     83
    7684/** Initializes a new ddf driver instance of OHCI hcd.
    7785 *
     
    8391        usb_log_debug("ohci_dev_add() called\n");
    8492        assert(device);
    85 
    86         const int ret = ddf_hcd_device_setup_all(device, USB_SPEED_FULL,
    87             BANDWIDTH_AVAILABLE_USB11, bandwidth_count_usb11,
    88             ddf_hcd_gen_irq_handler, ohci_hc_gen_irq_code,
    89             ohci_driver_init, ohci_driver_fini);
    90         if (ret != EOK) {
    91                 usb_log_error("Failed to initialize OHCI driver: %s.\n",
    92                     str_error(ret));
    93         }
    94         usb_log_info("Controlling new OHCI device '%s'.\n",
    95             ddf_dev_get_name(device));
    96 
    97         return ret;
     93        return hcd_ddf_add_hc(device, &ohci_hc_driver);
    9894}
    9995
Note: See TracChangeset for help on using the changeset viewer.