summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-07-23 06:55:05 -0600
committerSimon Glass <sjg@chromium.org>2014-07-23 14:07:24 +0100
commitd97143a67c696101b68eaaa3deb57ab36e288b77 (patch)
tree44a7cfa571285634c77e12fe5486933f404fca0a /include
parentab7cd62790c4f7831b91eab8a2ec81742d01bb54 (diff)
downloadu-boot-imx-d97143a67c696101b68eaaa3deb57ab36e288b77.zip
u-boot-imx-d97143a67c696101b68eaaa3deb57ab36e288b77.tar.gz
u-boot-imx-d97143a67c696101b68eaaa3deb57ab36e288b77.tar.bz2
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>
Diffstat (limited to 'include')
-rw-r--r--include/stdio_dev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/stdio_dev.h b/include/stdio_dev.h
index 4587005..a7d0825 100644
--- a/include/stdio_dev.h
+++ b/include/stdio_dev.h
@@ -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);