Changeset 5f57929 in mainline for uspace/drv/bus/usb/uhci/uhci_batch.c


Ignore:
Timestamp:
2011-09-01T00:08:44Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f1586d0
Parents:
7bce1fc
Message:

uhci,ohci: remove logging macro

File:
1 edited

Legend:

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

    r7bce1fc r5f57929  
    152152/** Check batch TDs for activity.
    153153 *
    154  * @param[in] instance Batch structure to use.
     154 * @param[in] uhci_batch Batch structure to use.
    155155 * @return False, if there is an active TD, true otherwise.
    156156 *
     
    202202        return true;
    203203}
    204 
    205 #define LOG_BATCH_INITIALIZED(batch, name, dir) \
    206         usb_log_debug2("Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
    207             (batch), (name), (dir), USB_TRANSFER_BATCH_ARGS(*(batch)))
    208 
    209204/*----------------------------------------------------------------------------*/
    210205/** Prepare generic data transfer
    211206 *
    212  * @param[in] instance Batch structure to use.
     207 * @param[in] uhci_batch Batch structure to use.
    213208 * @param[in] pid Pid to use for data transactions.
    214209 *
     
    261256        td_set_ioc(&uhci_batch->tds[td - 1]);
    262257        endpoint_toggle_set(uhci_batch->usb_batch->ep, toggle);
    263         LOG_BATCH_INITIALIZED(uhci_batch->usb_batch,
     258        usb_log_debug2(
     259            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     260            uhci_batch->usb_batch,
    264261            usb_str_transfer_type(uhci_batch->usb_batch->ep->transfer_type),
    265             usb_str_direction(uhci_batch->usb_batch->ep->direction));
     262            usb_str_direction(uhci_batch->usb_batch->ep->direction),
     263            USB_TRANSFER_BATCH_ARGS(*uhci_batch->usb_batch));
    266264}
    267265/*----------------------------------------------------------------------------*/
    268266/** Prepare generic control transfer
    269267 *
    270  * @param[in] instance Batch structure to use.
     268 * @param[in] uhci_batch Batch structure to use.
    271269 * @param[in] data_stage Pid to use for data tds.
    272270 * @param[in] status_stage Pid to use for data tds.
     
    341339        /* Check first bit of the first setup request byte
    342340         * (it signals hc-> dev or dev->hc communication) */
     341        const char *direction = NULL;
    343342        if (uhci_batch->usb_batch->setup_buffer[0] & (1 << 7)) {
    344343                batch_control(uhci_batch, USB_PID_IN, USB_PID_OUT);
    345                 LOG_BATCH_INITIALIZED(uhci_batch->usb_batch, "control", "read");
     344                direction = "read";
    346345        } else {
    347346                batch_control(uhci_batch, USB_PID_OUT, USB_PID_IN);
    348                 LOG_BATCH_INITIALIZED(uhci_batch->usb_batch, "control", "write");
    349         }
     347                direction = "write";
     348        }
     349        usb_log_debug2(
     350            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     351            uhci_batch->usb_batch,
     352            usb_str_transfer_type(uhci_batch->usb_batch->ep->transfer_type),
     353            direction, USB_TRANSFER_BATCH_ARGS(*uhci_batch->usb_batch));
    350354}
    351355/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.