Changes in uspace/srv/hid/input/generic/input.c [333c233:15f3c3f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/generic/input.c
r333c233 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 */ … … 410 410 #endif 411 411 #if defined(MACHINE_msim) 412 kbd_add_dev(&msim_port, & stty_ctl);412 kbd_add_dev(&msim_port, &pc_ctl); 413 413 #endif 414 414 #if (defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul)) && defined(CONFIG_FB) … … 424 424 kbd_add_dev(&niagara_port, &stty_ctl); 425 425 #endif 426 #if defined(UARCH_sparc64) && defined(MACHINE_serengeti) 427 kbd_add_dev(&sgcn_port, &stty_ctl); 428 #endif 426 429 #if defined(UARCH_sparc64) && defined(MACHINE_generic) 430 kbd_add_dev(&z8530_port, &sun_ctl); 427 431 kbd_add_dev(&ns16550_port, &sun_ctl); 428 432 #endif … … 482 486 /** Periodically check for new input devices. 483 487 * 484 * Looks under / dev/class/keyboard and /dev/class/mouse.488 * Looks under /loc/class/keyboard and /loc/class/mouse. 485 489 * 486 490 * @param arg Ignored … … 500 504 * Check for new keyboard device 501 505 */ 502 rc = asprintf(&dev_path, "/ dev/class/keyboard\\%zu", kbd_id);506 rc = asprintf(&dev_path, "/loc/class/keyboard\\%zu", kbd_id); 503 507 if (rc < 0) 504 508 continue; … … 517 521 * Check for new mouse device 518 522 */ 519 rc = asprintf(&dev_path, "/ dev/class/mouse\\%zu", mouse_id);523 rc = asprintf(&dev_path, "/loc/class/mouse\\%zu", mouse_id); 520 524 if (rc < 0) 521 525 continue; … … 552 556 printf("%s: HelenOS input service\n", NAME); 553 557 558 sysarg_t fhc; 554 559 sysarg_t obio; 555 560 … … 557 562 list_initialize(&mouse_devs); 558 563 559 if ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio)) 564 if (((sysinfo_get_value("kbd.cir.fhc", &fhc) == EOK) && (fhc)) 565 || ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio))) 560 566 irc_service = true; 561 567 … … 567 573 /* Add legacy keyboard devices. */ 568 574 kbd_add_legacy_devs(); 569 575 570 576 /* Add legacy mouse devices. */ 571 577 mouse_add_legacy_devs(); 572 578 573 579 /* Register driver */ 574 int rc = devmap_driver_register(NAME, client_connection);580 int rc = loc_server_register(NAME, client_connection); 575 581 if (rc < 0) { 576 printf("%s: Unable to register driver (%d)\n", NAME, rc);582 printf("%s: Unable to register server (%d)\n", NAME, rc); 577 583 return -1; 578 584 } 579 585 580 char kbd[ DEVMAP_NAME_MAXLEN + 1];581 snprintf(kbd, DEVMAP_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);582 583 devmap_handle_t devmap_handle;584 if ( devmap_device_register(kbd, &devmap_handle) != EOK) {585 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); 586 592 return -1; 587 593 }
Note:
See TracChangeset
for help on using the changeset viewer.