Changeset eb1a2f4 in mainline for uspace/drv/usbhid/main.c
- Timestamp:
- 2011-02-22T23:30:56Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b5d1535, a9c674e0
- Parents:
- dbe25f1 (diff), 664af708 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/main.c
rdbe25f1 reb1a2f4 36 36 */ 37 37 38 #include <d river.h>38 #include <ddf/driver.h> 39 39 #include <ipc/driver.h> 40 40 #include <ipc/kbd.h> … … 72 72 }; 73 73 74 static void default_connection_handler(d evice_t *, ipc_callid_t, ipc_call_t *);75 static d evice_ops_t keyboard_ops = {74 static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *); 75 static ddf_dev_ops_t keyboard_ops = { 76 76 .default_handler = default_connection_handler 77 77 }; … … 85 85 * @param icall Call data. 86 86 */ 87 void default_connection_handler(d evice_t *dev,87 void default_connection_handler(ddf_fun_t *fun, 88 88 ipc_callid_t icallid, ipc_call_t *icall) 89 89 { … … 413 413 } 414 414 415 static usb_hid_dev_kbd_t *usbkbd_init_device(d evice_t *dev)415 static usb_hid_dev_kbd_t *usbkbd_init_device(ddf_dev_t *dev) 416 416 { 417 417 int rc; … … 554 554 } 555 555 556 d evice_t *dev = (device_t *)arg;556 ddf_dev_t *dev = (ddf_dev_t *)arg; 557 557 558 558 // initialize device (get and process descriptors, get address, etc.) … … 568 568 } 569 569 570 static int usbkbd_add_device(d evice_t *dev)570 static int usbkbd_add_device(ddf_dev_t *dev) 571 571 { 572 572 /* For now, fail immediately. */ … … 590 590 591 591 /* 592 * Create default function. 593 */ 594 // FIXME - check for errors 595 ddf_fun_t *kbd_fun = ddf_fun_create(dev, fun_exposed, "keyboard"); 596 assert(kbd_fun != NULL); 597 kbd_fun->ops = &keyboard_ops; 598 599 int rc = ddf_fun_bind(kbd_fun); 600 assert(rc == EOK); 601 rc = ddf_fun_add_to_class(kbd_fun, "keyboard"); 602 assert(rc == EOK); 603 604 /* 592 605 * Create new fibril for handling this keyboard 593 606 */ … … 599 612 fibril_add_ready(fid); 600 613 601 dev->ops = &keyboard_ops; 602 603 add_device_to_class(dev, "keyboard"); 614 //dev->ops = &keyboard_ops; 615 (void)keyboard_ops; 616 617 //add_device_to_class(dev, "keyboard"); 604 618 605 619 /* … … 621 635 { 622 636 usb_log_enable(USB_LOG_LEVEL_INFO, "usbhid"); 623 return d river_main(&kbd_driver);637 return ddf_driver_main(&kbd_driver); 624 638 } 625 639
Note:
See TracChangeset
for help on using the changeset viewer.