lkml.org 
[lkml]   [2020]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 5/5] console: Introduce ->exit() callback
On Tue, Jan 28, 2020 at 02:17:11PM +0900, Sergey Senozhatsky wrote:
> On (20/01/27 13:47), Andy Shevchenko wrote:

...

> > @@ -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?

This is a good point. The ->exit() purpose is to keep balance for whatever
happened at ->setup().

But ->setup() is being called either when we have has_preferred == false or
when we got no matching we call it for all such consoles, till it returns an
error (can you elaborate the logic behind it?).

In both cases we will get the console to have CON_ENABLED flag set.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2020-01-28 10:45    [W:0.118 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site