[Skiboot] [RFC PATCH 02/12] core/console: Remove the read/poll_read con_ops

Oliver O'Halloran oohall at gmail.com
Tue May 19 15:46:23 AEST 2020


These were only ever used for the dummy console backed by the mambo
console. Now that we have an actual OPAL console driver for mambo we
don't need them.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 core/console.c    | 4 ----
 include/console.h | 2 --
 2 files changed, 6 deletions(-)

diff --git a/core/console.c b/core/console.c
index 2a1509025b56..42328dbe2d2e 100644
--- a/core/console.c
+++ b/core/console.c
@@ -260,8 +260,6 @@ ssize_t read(int fd __unused, void *buf, size_t req_count)
 	bool need_unlock = lock_recursive(&con_lock);
 	size_t count = 0;
 
-	if (con_driver && con_driver->read)
-		count = con_driver->read(buf, req_count);
 	if (!count)
 		count = inmem_read(buf, req_count);
 	if (need_unlock)
@@ -412,8 +410,6 @@ static void dummy_console_poll(void *data __unused)
 	bool has_data = false;
 
 	lock(&con_lock);
-	if (con_driver && con_driver->poll_read)
-		has_data = con_driver->poll_read();
 	if (memcons.in_prod != memcons.in_cons)
 		has_data = true;
 	if (has_data)
diff --git a/include/console.h b/include/console.h
index c14a2e598191..6abd04b77d78 100644
--- a/include/console.h
+++ b/include/console.h
@@ -35,8 +35,6 @@ extern struct memcons memcons;
 /* Console driver */
 struct con_ops {
 	size_t (*write)(const char *buf, size_t len);
-	size_t (*read)(char *buf, size_t len);
-	bool (*poll_read)(void);
 };
 
 struct opal_con_ops {
-- 
2.26.2



More information about the Skiboot mailing list