Changeset 15f3c3f in mainline for uspace/srv/hid/input/generic/input.c
- Timestamp:
- 2011-06-22T22:00:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 86ffa27f
- Parents:
- ef09a7a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/generic/input.c
ref09a7a r15f3c3f 53 53 #include <io/console.h> 54 54 #include <io/keycode.h> 55 #include < devmap.h>55 #include <loc.h> 56 56 #include <input.h> 57 57 #include <kbd.h> … … 324 324 /** Add new kbdev device. 325 325 * 326 * @param dev_path Filesystem path to the device (/ dev/class/...)326 * @param dev_path Filesystem path to the device (/loc/class/...) 327 327 * 328 328 */ … … 352 352 /** Add new mousedev device. 353 353 * 354 * @param dev_path Filesystem path to the device (/ dev/class/...)354 * @param dev_path Filesystem path to the device (/loc/class/...) 355 355 * 356 356 */ … … 486 486 /** Periodically check for new input devices. 487 487 * 488 * Looks under / dev/class/keyboard and /dev/class/mouse.488 * Looks under /loc/class/keyboard and /loc/class/mouse. 489 489 * 490 490 * @param arg Ignored … … 504 504 * Check for new keyboard device 505 505 */ 506 rc = asprintf(&dev_path, "/ dev/class/keyboard\\%zu", kbd_id);506 rc = asprintf(&dev_path, "/loc/class/keyboard\\%zu", kbd_id); 507 507 if (rc < 0) 508 508 continue; … … 521 521 * Check for new mouse device 522 522 */ 523 rc = asprintf(&dev_path, "/ dev/class/mouse\\%zu", mouse_id);523 rc = asprintf(&dev_path, "/loc/class/mouse\\%zu", mouse_id); 524 524 if (rc < 0) 525 525 continue; … … 573 573 /* Add legacy keyboard devices. */ 574 574 kbd_add_legacy_devs(); 575 575 576 576 /* Add legacy mouse devices. */ 577 577 mouse_add_legacy_devs(); 578 578 579 579 /* Register driver */ 580 int rc = devmap_driver_register(NAME, client_connection);580 int rc = loc_server_register(NAME, client_connection); 581 581 if (rc < 0) { 582 printf("%s: Unable to register driver (%d)\n", NAME, rc);582 printf("%s: Unable to register server (%d)\n", NAME, rc); 583 583 return -1; 584 584 } 585 585 586 char kbd[ DEVMAP_NAME_MAXLEN + 1];587 snprintf(kbd, DEVMAP_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);588 589 devmap_handle_t devmap_handle;590 if ( devmap_device_register(kbd, &devmap_handle) != EOK) {591 printf("%s: Unable to register device %s\n", NAME, kbd);586 char kbd[LOC_NAME_MAXLEN + 1]; 587 snprintf(kbd, LOC_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME); 588 589 service_id_t service_id; 590 if (loc_service_register(kbd, &service_id) != EOK) { 591 printf("%s: Unable to register service %s\n", NAME, kbd); 592 592 return -1; 593 593 }
Note:
See TracChangeset
for help on using the changeset viewer.