From c090e8f2367f1c532bf30935104eccdada9d013d Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 11 Feb 2021 17:09:34 +0200 Subject: stdio: Get rid of dead code, i.e. stdio_deregister() Nobody is using stdio_deregister(), remove for good. Note, even its parameters are not consistent with stdio_register(). So, if anyone want to introduce this again, better with some consistency. Signed-off-by: Andy Shevchenko --- include/stdio_dev.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/stdio_dev.h') diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 48871a6a22b..109a68d0640 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -83,7 +83,6 @@ int stdio_add_devices(void); int stdio_init(void); void stdio_print_current_devices(void); -int stdio_deregister(const char *devname, int force); /** * stdio_deregister_dev() - deregister the device "devname". -- cgit v1.2.3 From d9b0ac90baf499d215462ed7afffbfd22a58340b Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 11 Feb 2021 17:09:36 +0200 Subject: stdio: Introduce a new helper stdio_file_to_flags() Let's deduplicate existing copies by splitting off to a new helper. Signed-off-by: Andy Shevchenko --- include/stdio_dev.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/stdio_dev.h') diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 109a68d0640..8fb9a12dd87 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -18,6 +18,8 @@ #define DEV_FLAGS_OUTPUT 0x00000002 /* Device can be used as output console */ #define DEV_FLAGS_DM 0x00000004 /* Device priv is a struct udevice * */ +int stdio_file_to_flags(const int file); + /* Device information */ struct stdio_dev { int flags; /* Device flags: input/output/system */ -- cgit v1.2.3