Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci.c

    r8820544 r5b89d43b  
    3434 */
    3535
     36/* XXX Fix this */
     37#define _DDF_DATA_IMPLANT
     38
    3639#include <errno.h>
    3740#include <stdbool.h>
     
    5962        hc_t hc;
    6063        /** Internal driver's representation of UHCI root hub */
    61         rh_t *rh;
     64        rh_t rh;
    6265} uhci_t;
    6366
     
    6972/** IRQ handling callback, forward status from call to diver structure.
    7073 *
     74 * @param[in] dev DDF instance of the device to use.
    7175 * @param[in] iid (Unused).
    7276 * @param[in] call Pointer to the call from kernel.
    73  * @param[in] dev DDF instance of the device to use.
    74  *
    75  */
    76 static void irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev)
     77 */
     78static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
    7779{
    7880        assert(dev);
    79        
    8081        uhci_t *uhci = dev_to_uhci(dev);
    8182        if (!uhci) {
     
    8384                return;
    8485        }
    85        
    8686        const uint16_t status = IPC_GET_ARG1(*call);
    8787        hc_interrupt(&uhci->hc, status);
     
    186186
    187187        ddf_fun_set_ops(instance->hc_fun, &hc_ops);
     188        ddf_fun_data_implant(instance->hc_fun, &instance->hc.generic);
    188189
    189190        instance->rh_fun = ddf_fun_create(device, fun_inner, "uhci_rh");
     
    195196
    196197        ddf_fun_set_ops(instance->rh_fun, &rh_ops);
    197         instance->rh = ddf_fun_data_alloc(instance->rh_fun, sizeof(rh_t));
     198        ddf_fun_data_implant(instance->rh_fun, &instance->rh);
    198199
    199200        addr_range_t regs;
     
    235236        }
    236237
    237         rc = hc_init(&instance->hc, instance->hc_fun, &regs, interrupts);
     238        rc = hc_init(&instance->hc, &regs, interrupts);
    238239        if (rc != EOK) {
    239240                usb_log_error("Failed to init uhci_hcd: %s.\n", str_error(rc));
     
    259260        }
    260261
    261         rc = rh_init(instance->rh, instance->rh_fun, &regs, 0x10, 4);
     262        rc = rh_init(&instance->rh, instance->rh_fun, &regs, 0x10, 4);
    262263        if (rc != EOK) {
    263264                usb_log_error("Failed to setup UHCI root hub: %s.\n",
Note: See TracChangeset for help on using the changeset viewer.