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


Ignore:
Timestamp:
2011-03-22T10:07:53Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f8e4cb6
Parents:
18b3cfd (diff), b01995b (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:

Merged changes from development

File:
1 edited

Legend:

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

    r18b3cfd r62f4212  
    3636#include <device/hw_res.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <usb_iface.h>
    3940#include <usb/ddfiface.h>
     
    8687        int ret = hc_get_my_registers(device, &io_regs, &io_size);
    8788        if (ret != EOK) {
    88                 usb_log_error("Failed(%d) to get registers from parent hc.",
    89                     ret);
    90         }
    91         usb_log_info("I/O regs at %#X (size %zu).\n", io_regs, io_size);
     89                usb_log_error("Failed to get registers from parent HC: %s.\n",
     90                    str_error(ret));
     91        }
     92        usb_log_debug("I/O regs at %#X (size %zu).\n", io_regs, io_size);
    9293
    9394        uhci_root_hub_t *rh = malloc(sizeof(uhci_root_hub_t));
     
    99100        ret = uhci_root_hub_init(rh, (void*)io_regs, io_size, device);
    100101        if (ret != EOK) {
    101                 usb_log_error("Failed(%d) to initialize driver instance.\n", ret);
     102                usb_log_error("Failed to initialize driver instance: %s.\n",
     103                    str_error(ret));
    102104                free(rh);
    103105                return ret;
     
    105107
    106108        device->driver_data = rh;
    107         usb_log_info("Sucessfully initialized driver instance for device:%d.\n",
    108             device->handle);
     109        usb_log_info("Controlling root hub `%s' (%llu).\n",
     110            device->name, device->handle);
    109111        return EOK;
    110112}
     
    129131int main(int argc, char *argv[])
    130132{
    131         usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
     133        printf(NAME ": HelenOS UHCI root hub driver.\n");
     134
     135        usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME);
     136
    132137        return ddf_driver_main(&uhci_rh_driver);
    133138}
Note: See TracChangeset for help on using the changeset viewer.