Changeset dab3112 in mainline


Ignore:
Timestamp:
2011-10-16T16:14:56Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0fe2ff1
Parents:
d5abaf4
Message:

ohci: Remove unused code.

File:
1 edited

Legend:

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

    rd5abaf4 rdab3112  
    172172        ohci_batch->usb_batch->transfered_size =
    173173            ohci_batch->usb_batch->buffer_size;
    174         /* Assume we will leave the last td behind */
     174
     175        /* Assume we will leave the last(unused) TD behind */
    175176        ohci_batch->leave_td = ohci_batch->td_count;
    176177
     
    234235        assert(ohci_ep);
    235236        ohci_ep->td = ohci_batch->tds[ohci_batch->leave_td];
    236 #if 0
    237         assert(i > 0);
    238         ohci_batch->usb_batch->transfered_size =
    239             ohci_batch->usb_batch->buffer_size;
    240         for (--i;i < ohci_batch->td_count; ++i) {
    241                 ohci_batch->usb_batch->transfered_size
    242                     -= td_remain_size(ohci_batch->tds[i]);
    243         }
    244 #endif
    245         /* Just make sure that we are leaving the right TD behind */
     237
     238        /* Make sure that we are leaving the right TD behind */
    246239        const uint32_t pa = addr_to_phys(ohci_ep->td);
    247240        assert(pa == (ohci_batch->ed->td_head & ED_TDHEAD_PTR_MASK));
     
    288281        const usb_direction_t status_dir = reverse_dir[dir];
    289282
    290         /* setup stage */
     283        /* Setup stage */
    291284        td_init(
    292285            ohci_batch->tds[0], ohci_batch->tds[1], USB_DIRECTION_BOTH,
     
    297290        buffer += ohci_batch->usb_batch->setup_size;
    298291
    299         /* data stage */
     292        /* Data stage */
    300293        size_t td_current = 1;
    301294        size_t remain_size = ohci_batch->usb_batch->buffer_size;
     
    321314        }
    322315
    323         /* status stage */
     316        /* Status stage */
    324317        assert(td_current == ohci_batch->td_count - 1);
    325318        td_init(ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1],
Note: See TracChangeset for help on using the changeset viewer.