Changeset 790318e in mainline
- Timestamp:
- 2011-09-16T11:50:06Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 82a31261
- Parents:
- 058fd76
- Location:
- uspace/drv/bus/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_batch.c
r058fd76 r790318e 42 42 #include "utils/malloc32.h" 43 43 44 static void (*const batch_setup[ 4][3])(ohci_transfer_batch_t*, usb_direction_t);44 static void (*const batch_setup[])(ohci_transfer_batch_t*, usb_direction_t); 45 45 /*----------------------------------------------------------------------------*/ 46 46 /** Safely destructs ohci_transfer_batch_t structure … … 137 137 138 138 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); 141 141 142 142 return ohci_batch; … … 347 347 } 348 348 /*----------------------------------------------------------------------------*/ 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 },349 static 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, 355 355 }; 356 356 /** -
uspace/drv/bus/usb/uhci/uhci_batch.c
r058fd76 r790318e 68 68 } 69 69 /*----------------------------------------------------------------------------*/ 70 static void (*const batch_setup[ 4][3])(uhci_transfer_batch_t*, usb_direction_t);70 static void (*const batch_setup[])(uhci_transfer_batch_t*, usb_direction_t); 71 71 /*----------------------------------------------------------------------------*/ 72 72 /** Allocate memory and initialize internal data structure. … … 141 141 const usb_direction_t dir = usb_transfer_batch_direction(usb_batch); 142 142 143 assert(batch_setup[usb_batch->ep->transfer_type] [dir]);144 batch_setup[usb_batch->ep->transfer_type] [dir](uhci_batch, dir);143 assert(batch_setup[usb_batch->ep->transfer_type]); 144 batch_setup[usb_batch->ep->transfer_type](uhci_batch, dir); 145 145 146 146 return uhci_batch; … … 336 336 } 337 337 /*----------------------------------------------------------------------------*/ 338 static void (*const batch_setup[ 4][3])(uhci_transfer_batch_t*, usb_direction_t) =339 { 340 { batch_control, batch_control, NULL },341 { NULL, NULL, NULL },342 { batch_data, batch_data, NULL },343 { batch_data, batch_data, NULL },338 static void (*const batch_setup[])(uhci_transfer_batch_t*, usb_direction_t) = 339 { 340 [USB_TRANSFER_CONTROL] = batch_control, 341 [USB_TRANSFER_BULK] = batch_data, 342 [USB_TRANSFER_INTERRUPT] = batch_data, 343 [USB_TRANSFER_ISOCHRONOUS] = NULL, 344 344 }; 345 345 /**
Note:
See TracChangeset
for help on using the changeset viewer.