Changeset 3f162ab in mainline for uspace/drv


Ignore:
Timestamp:
2011-12-05T20:34:52Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f167f55b
Parents:
c3887ad
Message:

usb: Use macros from macros.h header.

Location:
uspace/drv/bus/usb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    rc3887ad r3f162ab  
    3434#include <errno.h>
    3535#include <str_error.h>
     36#include <macros.h>
    3637
    3738#include <usb/usb.h>
     
    295296        while (remain_size > 0) {
    296297                const size_t transfer_size =
    297                     remain_size > OHCI_TD_MAX_TRANSFER ?
    298                     OHCI_TD_MAX_TRANSFER : remain_size;
     298                    min(remain_size, OHCI_TD_MAX_TRANSFER);
    299299                toggle = 1 - toggle;
    300300
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    rc3887ad r3f162ab  
    3434#include <errno.h>
    3535#include <str_error.h>
     36#include <macros.h>
    3637
    3738#include <usb/usb.h>
     
    237238
    238239        while (remain_size > 0) {
    239                 const size_t packet_size =
    240                     (remain_size < mps) ? remain_size : mps;
     240                const size_t packet_size = min(remain_size, mps);
    241241
    242242                const td_t *next_td = (td + 1 < uhci_batch->td_count)
     
    309309
    310310        while (remain_size > 0) {
    311                 const size_t packet_size =
    312                     (remain_size < mps) ? remain_size : mps;
     311                const size_t packet_size = min(remain_size, mps);
    313312
    314313                td_init(
Note: See TracChangeset for help on using the changeset viewer.