mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
stdio: Provide functions to add/remove devices using stdio_dev
The current functions for adding and removing devices require a device name. This is not convenient for driver model, which wants to store a pointer to the relevant device. Add new functions which provide this feature and adjust the old ones to call these. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ab7cd62790
commit
d97143a67c
2 changed files with 26 additions and 8 deletions
|
@ -77,10 +77,12 @@ extern char *stdio_names[MAX_FILES];
|
|||
* PROTOTYPES
|
||||
*/
|
||||
int stdio_register (struct stdio_dev * dev);
|
||||
int stdio_register_dev(struct stdio_dev *dev, struct stdio_dev **devp);
|
||||
int stdio_init (void);
|
||||
void stdio_print_current_devices(void);
|
||||
#ifdef CONFIG_SYS_STDIO_DEREGISTER
|
||||
int stdio_deregister(const char *devname);
|
||||
int stdio_deregister_dev(struct stdio_dev *dev);
|
||||
#endif
|
||||
struct list_head* stdio_get_list(void);
|
||||
struct stdio_dev* stdio_get_by_name(const char* name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue