Changeset a1732929 in mainline for uspace/drv/bus/usb/usbmid/main.c


Ignore:
Timestamp:
2018-01-15T17:04:34Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ff99e8
Parents:
c1a966e
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:32)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:34)
Message:

usb: unified logging

Use logger instead of printf. Logger adds newlines automatically.

File:
1 edited

Legend:

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

    rc1a966e ra1732929  
    5151static int usbmid_device_add(usb_device_t *dev)
    5252{
    53         usb_log_info("Taking care of new MID `%s'.\n", usb_device_get_name(dev));
     53        usb_log_info("Taking care of new MID `%s'.", usb_device_get_name(dev));
    5454
    5555        return usbmid_explore_device(dev);
     
    6868                const int pret = usbmid_interface_destroy(iface);
    6969                if (pret != EOK) {
    70                         usb_log_error("Failed to remove child `%s': %s\n",
     70                        usb_log_error("Failed to remove child `%s': %s",
    7171                            ddf_fun_get_name(iface->fun), str_error(pret));
    7272                        ret = pret;
     
    9191        int ret = ddf_fun_unbind(usb_mid->ctl_fun);
    9292        if (ret != EOK) {
    93                 usb_log_error("Failed to unbind USB MID ctl function: %s.\n",
     93                usb_log_error("Failed to unbind USB MID ctl function: %s.",
    9494                    str_error(ret));
    9595                return ret;
     
    9999        /* Remove all children */
    100100        list_foreach(usb_mid->interface_list, link, usbmid_interface_t, iface) {
    101                 usb_log_info("Removing child `%s'.\n",
     101                usb_log_info("Removing child `%s'.",
    102102                    ddf_fun_get_name(iface->fun));
    103103
     
    105105                int pret = ddf_fun_offline(iface->fun);
    106106                if (pret != EOK) {
    107                         usb_log_warning("Failed to turn off child `%s': %s\n",
     107                        usb_log_warning("Failed to turn off child `%s': %s",
    108108                            ddf_fun_get_name(iface->fun), str_error(pret));
    109109                        ret = pret;
     
    125125        assert(usb_mid);
    126126
    127         usb_log_info("USB MID gone: `%s'.\n", usb_device_get_name(dev));
     127        usb_log_info("USB MID gone: `%s'.", usb_device_get_name(dev));
    128128
    129129        /* Remove ctl function */
    130130        int ret = ddf_fun_unbind(usb_mid->ctl_fun);
    131131        if (ret != EOK) {
    132                 usb_log_error("Failed to unbind USB MID ctl function: %s.\n",
     132                usb_log_error("Failed to unbind USB MID ctl function: %s.",
    133133                    str_error(ret));
    134134                return ret;
Note: See TracChangeset for help on using the changeset viewer.