Changeset 3f162ab in mainline
- Timestamp:
- 2011-12-05T20:34:52Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f167f55
- Parents:
- c3887ad
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_batch.c
rc3887ad r3f162ab 34 34 #include <errno.h> 35 35 #include <str_error.h> 36 #include <macros.h> 36 37 37 38 #include <usb/usb.h> … … 295 296 while (remain_size > 0) { 296 297 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); 299 299 toggle = 1 - toggle; 300 300 -
uspace/drv/bus/usb/uhci/uhci_batch.c
rc3887ad r3f162ab 34 34 #include <errno.h> 35 35 #include <str_error.h> 36 #include <macros.h> 36 37 37 38 #include <usb/usb.h> … … 237 238 238 239 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); 241 241 242 242 const td_t *next_td = (td + 1 < uhci_batch->td_count) … … 309 309 310 310 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); 313 312 314 313 td_init( -
uspace/lib/usbhost/src/usb_transfer_batch.c
rc3887ad r3f162ab 34 34 #include <errno.h> 35 35 #include <str_error.h> 36 #include <macros.h> 36 37 37 38 #include <usb/usb.h> … … 146 147 /* We care about the data and there are some to copy */ 147 148 if (data) { 148 const size_t min_size = size < instance->buffer_size 149 ? size : instance->buffer_size; 150 memcpy(instance->buffer, data, min_size); 149 const size_t minsize = min(size, instance->buffer_size); 150 memcpy(instance->buffer, data, minsize); 151 151 } 152 152 instance->callback_in(instance->fun, instance->error,
Note:
See TracChangeset
for help on using the changeset viewer.