Changeset 5944244 in mainline for uspace/drv/uhci-hcd/main.c


Ignore:
Timestamp:
2011-02-01T23:25:48Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f5c1e61
Parents:
c56dbe0
Message:

Refactoring uhci_ functions are called on uhci_t not device_t

File:
1 edited

Legend:

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

    rc56dbe0 r5944244  
    8787            io_reg_base, io_reg_size, irq);
    8888
    89         int ret = uhci_init(device, (void*)io_reg_base, io_reg_size);
     89        uhci_t *uhci_hc = malloc(sizeof(uhci_t));
     90        if (!uhci_hc) {
     91                usb_log_error("Failed to allocaete memory for uhci hcd driver.\n");
     92                return ENOMEM;
     93        }
    9094
     95        int ret = uhci_init(uhci_hc, (void*)io_reg_base, io_reg_size);
    9196        if (ret != EOK) {
    9297                usb_log_error("Failed to init uhci-hcd.\n");
     
    108113                return ret;
    109114        }
     115
     116        device->driver_data = uhci_hc;
    110117
    111118        return EOK;
Note: See TracChangeset for help on using the changeset viewer.