[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200128051711.GB115889@google.com>
Date: Tue, 28 Jan 2020 14:17:11 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/5] console: Introduce ->exit() callback
On (20/01/27 13:47), Andy Shevchenko wrote:
[..]
> +++ b/include/linux/console.h
> @@ -148,6 +148,7 @@ struct console {
> struct tty_driver *(*device)(struct console *, int *);
> void (*unblank)(void);
> int (*setup)(struct console *, char *);
> + void (*exit)(struct console *);
> int (*match)(struct console *, char *name, int idx, char *options);
> short flags;
> short index;
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index da6a9bdf76b6..6ca03d199132 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2853,6 +2853,10 @@ int unregister_console(struct console *console)
> console->flags &= ~CON_ENABLED;
> console_unlock();
> console_sysfs_notify();
> +
> + if (console->exit)
> + console->exit(console);
> +
If the console was not registered (hence not enabled) is it still required
to call ->exit()? Is there a requirement that ->exit() should handle such
cases?
-ss
Powered by blists - more mailing lists