if (strcmp(sdev->name, name) == 0)
return sdev;
}
- if (IS_ENABLED(CONFIG_DM_VIDEO)) {
+ if (IS_ENABLED(CONFIG_VIDEO)) {
/*
* We did not find a suitable stdio device. If there is a video
* driver with a name starting with 'vidconsole', we can try
int stdio_deregister_dev(struct stdio_dev *dev, int force)
{
struct list_head *pos;
- char temp_names[3][16];
+ char temp_names[3][STDIO_NAME_LEN];
int i;
/* get stdio devices (ListRemoveItem changes the dev list) */
/* Device is assigned -> report error */
return -EBUSY;
}
- memcpy(&temp_names[i][0], stdio_devices[i]->name,
- sizeof(temp_names[i]));
+ strlcpy(&temp_names[i][0], stdio_devices[i]->name,
+ sizeof(temp_names[i]));
}
list_del(&dev->list);
int stdio_init_tables(void)
{
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
- /* already relocated for current ARM implementation */
- ulong relocation_offset = gd->reloc_off;
- int i;
-
- /* relocate device name pointers */
- for (i = 0; i < (sizeof (stdio_names) / sizeof (char *)); ++i) {
- stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
- relocation_offset);
- }
-#endif /* CONFIG_NEEDS_MANUAL_RELOC */
-
/* Initialize the list */
INIT_LIST_HEAD(&devs.list);
#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
i2c_init_all();
#endif
- if (IS_ENABLED(CONFIG_DM_VIDEO)) {
+ if (IS_ENABLED(CONFIG_VIDEO)) {
/*
* If the console setting is not in environment variables then
* console_init_r() will not be calling iomux_doenv() (which
if (IS_ENABLED(CONFIG_SPLASH_SCREEN) &&
IS_ENABLED(CONFIG_CMD_BMP))
splash_display();
- } else {
- if (IS_ENABLED(CONFIG_LCD))
- drv_lcd_init();
- if (IS_ENABLED(CONFIG_VIDEO_VCXK))
- drv_video_init();
}
-#if defined(CONFIG_KEYBOARD) && !defined(CONFIG_DM_KEYBOARD)
- drv_keyboard_init();
-#endif
drv_system_init();
serial_stdio_init();
#ifdef CONFIG_USB_TTY
return 0;
}
-
-int stdio_init(void)
-{
- stdio_init_tables();
- stdio_add_devices();
-
- return 0;
-}