Changeset 790318e in mainline for uspace/drv/bus/usb/ohci/ohci_batch.c


Ignore:
Timestamp:
2011-09-16T11:50:06Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
82a31261
Parents:
058fd76
Message:

uhci,ohci: Remove direction from initialization table.

File:
1 edited

Legend:

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

    r058fd76 r790318e  
    4242#include "utils/malloc32.h"
    4343
    44 static void (*const batch_setup[4][3])(ohci_transfer_batch_t*, usb_direction_t);
     44static void (*const batch_setup[])(ohci_transfer_batch_t*, usb_direction_t);
    4545/*----------------------------------------------------------------------------*/
    4646/** Safely destructs ohci_transfer_batch_t structure
     
    137137
    138138        const usb_direction_t dir = usb_transfer_batch_direction(usb_batch);
    139         assert(batch_setup[usb_batch->ep->transfer_type][dir]);
    140         batch_setup[usb_batch->ep->transfer_type][dir](ohci_batch, dir);
     139        assert(batch_setup[usb_batch->ep->transfer_type]);
     140        batch_setup[usb_batch->ep->transfer_type](ohci_batch, dir);
    141141
    142142        return ohci_batch;
     
    347347}
    348348/*----------------------------------------------------------------------------*/
    349 static void (*const batch_setup[4][3])(ohci_transfer_batch_t*, usb_direction_t) =
    350 {
    351         { batch_control, batch_control, NULL },
    352         { NULL, NULL, NULL },
    353         { batch_data, batch_data, NULL },
    354         { batch_data, batch_data, NULL },
     349static void (*const batch_setup[])(ohci_transfer_batch_t*, usb_direction_t) =
     350{
     351        [USB_TRANSFER_CONTROL] = batch_control,
     352        [USB_TRANSFER_BULK] = batch_data,
     353        [USB_TRANSFER_INTERRUPT] = batch_data,
     354        [USB_TRANSFER_ISOCHRONOUS] = NULL,
    355355};
    356356/**
Note: See TracChangeset for help on using the changeset viewer.