Changeset 7b54b99 in mainline for uspace/drv/bus/usb/usbhid/kbd/kbddev.c
- Timestamp:
- 2011-10-14T14:46:59Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 571ba2a
- Parents:
- cddd151
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/kbd/kbddev.c
rcddd151 r7b54b99 514 514 /*----------------------------------------------------------------------------*/ 515 515 516 static int usb_kbd_create_function(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev) 517 { 518 assert(hid_dev != NULL); 519 assert(hid_dev->usb_dev != NULL); 516 static int usb_kbd_create_function(usb_kbd_t *kbd_dev) 517 { 520 518 assert(kbd_dev != NULL); 519 assert(kbd_dev->hid_dev != NULL); 520 assert(kbd_dev->hid_dev->usb_dev != NULL); 521 521 522 522 /* Create the exposed function. */ 523 523 usb_log_debug("Creating DDF function %s...\n", HID_KBD_FUN_NAME); 524 ddf_fun_t *fun = ddf_fun_create( hid_dev->usb_dev->ddf_dev, fun_exposed,525 HID_KBD_FUN_NAME);524 ddf_fun_t *fun = ddf_fun_create(kbd_dev->hid_dev->usb_dev->ddf_dev, 525 fun_exposed, HID_KBD_FUN_NAME); 526 526 if (fun == NULL) { 527 527 usb_log_error("Could not create DDF function node.\n"); … … 721 721 722 722 usb_log_debug("Creating KBD function...\n"); 723 int rc = usb_kbd_create_function( hid_dev,kbd_dev);723 int rc = usb_kbd_create_function(kbd_dev); 724 724 if (rc != EOK) { 725 725 usb_kbd_destroy(kbd_dev); … … 786 786 free(kbd_dev->keys_old); 787 787 free(kbd_dev->led_data); 788 788 789 if (kbd_dev->led_path != NULL) { 789 790 usb_hid_report_path_free(kbd_dev->led_path); … … 791 792 if (kbd_dev->output_buffer != NULL) { 792 793 usb_hid_report_output_free(kbd_dev->output_buffer); 794 } 795 796 if (ddf_fun_unbind(kbd_dev->fun) != EOK) { 797 usb_log_warning("Failed to unbind kbd function.\n"); 798 } else { 799 kbd_dev->fun->driver_data = NULL; 800 ddf_fun_destroy(kbd_dev->fun); 793 801 } 794 802 }
Note:
See TracChangeset
for help on using the changeset viewer.