• Daniel Vetter's avatar
    vt: Fix replacement console check when unbinding · 249f7b3e
    Daniel Vetter authored
    I don't fully understand the magic of the vt register/unregister
    logic, but apparently everything but the inital console (as set
    in the conswitchp pointer) is marked with FLAG_MODULE. Which means
    if something unregistered the boot vt driver (e.g. i915.ko kicking
    out vga_con) there's nothing left when trying to unbind e.g. fbcon
    through sysfs.
    
    But in most cases have the dummy console hanging around besides the
    boot console, so this test is fairly dubious. What we actually want is
    simply a different console than the one we want to unbind.
    
    v2: Correct the commit message to clarify that the dummy console isn't
    always around, but only in most cases (David).
    
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Jiri Slaby <jslaby@suse.cz>
    Cc: David Herrmann <dh.herrmann@gmail.com>
    Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
    Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    249f7b3e
vt.c 100 KB