stdio: Add force parameter to stdio_deregister

In some cases we really want to move forward with a deregister, add a force
parameter to allow this, and replace the dev with a nulldev in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2014-09-20 16:54:37 +02:00 committed by Marek Vasut
parent 3f78a28037
commit 32d019265d
4 changed files with 14 additions and 7 deletions

View file

@ -103,8 +103,8 @@ 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);
int stdio_deregister(const char *devname, int force);
int stdio_deregister_dev(struct stdio_dev *dev, int force);
#endif
struct list_head* stdio_get_list(void);
struct stdio_dev* stdio_get_by_name(const char* name);