Changeset f317490 in mainline for uspace/drv/bus/usb/usbhid/usbhid.c
- Timestamp:
- 2011-11-09T14:33:03Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d1ba51
- Parents:
- 07b9cbae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/usbhid.c
r07b9cbae rf317490 51 51 #include "subdrivers.h" 52 52 53 /*----------------------------------------------------------------------------*/54 55 53 /* Array of endpoints expected on the device, NULL terminated. */ 56 54 const usb_endpoint_description_t *usb_hid_endpoints[] = { … … 324 322 return EOK; 325 323 } 326 327 324 /*----------------------------------------------------------------------------*/ 328 325 /* … … 429 426 */ 430 427 bool ok = false; 431 for ( inti = 0; i < hid_dev->subdriver_count; ++i) {428 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { 432 429 if (hid_dev->subdrivers[i].init != NULL) { 433 430 usb_log_debug("Initializing subdriver %d.\n",i); … … 494 491 bool cont = false; 495 492 /* Continue if at least one of the subdrivers want to continue */ 496 for ( inti = 0; i < hid_dev->subdriver_count; ++i) {493 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { 497 494 if (hid_dev->subdrivers[i].poll != NULL) { 498 495 cont = cont || hid_dev->subdrivers[i].poll( … … 503 500 return cont; 504 501 } 505 506 /*----------------------------------------------------------------------------*/ 507 502 /*----------------------------------------------------------------------------*/ 508 503 void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason, void *arg) 509 504 { … … 513 508 usb_hid_dev_t *hid_dev = arg; 514 509 515 for ( inti = 0; i < hid_dev->subdriver_count; ++i) {510 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { 516 511 if (hid_dev->subdrivers[i].poll_end != NULL) { 517 512 hid_dev->subdrivers[i].poll_end( … … 522 517 hid_dev->running = false; 523 518 } 524 525 /*----------------------------------------------------------------------------*/ 526 519 /*----------------------------------------------------------------------------*/ 527 520 void usb_hid_new_report(usb_hid_dev_t *hid_dev) 528 521 { 529 522 ++hid_dev->report_nr; 530 523 } 531 532 /*----------------------------------------------------------------------------*/ 533 524 /*----------------------------------------------------------------------------*/ 534 525 int usb_hid_report_number(const usb_hid_dev_t *hid_dev) 535 526 { 536 527 return hid_dev->report_nr; 537 528 } 538 539 529 /*----------------------------------------------------------------------------*/ 540 530 void usb_hid_deinit(usb_hid_dev_t *hid_dev) … … 547 537 hid_dev->subdrivers, hid_dev->subdriver_count); 548 538 549 for ( inti = 0; i < hid_dev->subdriver_count; ++i) {539 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { 550 540 if (hid_dev->subdrivers[i].deinit != NULL) { 551 541 hid_dev->subdrivers[i].deinit(hid_dev,
Note:
See TracChangeset
for help on using the changeset viewer.