Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bd3a0e3 authored by Hans de Goede's avatar Hans de Goede Committed by Bartlomiej Zolnierkiewicz
Browse files

fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable



Replace comments about places where the console lock should be held with
calls to WARN_CONSOLE_UNLOCKED() to assert that it is actually held.

Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent d48de54a
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -828,6 +828,8 @@ static int set_con2fb_map(int unit, int newidx, int user)
	struct fb_info *oldinfo = NULL;
	struct fb_info *oldinfo = NULL;
 	int found, err = 0;
 	int found, err = 0;


	WARN_CONSOLE_UNLOCKED();

	if (oldidx == newidx)
	if (oldidx == newidx)
		return 0;
		return 0;


@@ -3044,6 +3046,8 @@ static int fbcon_fb_unbind(int idx)
{
{
	int i, new_idx = -1, ret = 0;
	int i, new_idx = -1, ret = 0;


	WARN_CONSOLE_UNLOCKED();

	if (!fbcon_has_console_bind)
	if (!fbcon_has_console_bind)
		return 0;
		return 0;


@@ -3094,6 +3098,8 @@ static int fbcon_fb_unregistered(struct fb_info *info)
{
{
	int i, idx;
	int i, idx;


	WARN_CONSOLE_UNLOCKED();

	idx = info->node;
	idx = info->node;
	for (i = first_fb_vc; i <= last_fb_vc; i++) {
	for (i = first_fb_vc; i <= last_fb_vc; i++) {
		if (con2fb_map[i] == idx)
		if (con2fb_map[i] == idx)
@@ -3131,6 +3137,9 @@ static int fbcon_fb_unregistered(struct fb_info *info)
static void fbcon_remap_all(int idx)
static void fbcon_remap_all(int idx)
{
{
	int i;
	int i;

	WARN_CONSOLE_UNLOCKED();

	for (i = first_fb_vc; i <= last_fb_vc; i++)
	for (i = first_fb_vc; i <= last_fb_vc; i++)
		set_con2fb_map(i, idx, 0);
		set_con2fb_map(i, idx, 0);


@@ -3177,6 +3186,8 @@ static int fbcon_fb_registered(struct fb_info *info)
{
{
	int ret = 0, i, idx;
	int ret = 0, i, idx;


	WARN_CONSOLE_UNLOCKED();

	idx = info->node;
	idx = info->node;
	fbcon_select_primary(info);
	fbcon_select_primary(info);