- for (index=1; index<=ListNumItems(devlist); index++) {
- old_dev = ListGetPtrToItem(devlist, index);
- if(strcmp(old_dev->name,DEVNAME)==0) {
- /* ok, already registered, just return ok */
- USB_KBD_PRINTF("USB KBD is already registered.\n");
- return 1;
- }
+ old_dev = stdio_get_by_name(DEVNAME);
+ if(old_dev) {
+ /* ok, already registered, just return ok */
+ USB_KBD_PRINTF("USB KBD is already registered.\n");
+ return 1;