Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev/core: Pass Linux device to pm_vt_switch_*() functions

Pass the Linux device to pm_vt_switch_*() instead of the virtual
fbdev device. Prepares fbdev for making struct fb_info.dev optional.

The type of device that is passed to the PM functions does not matter
much. It is only a token within the internal list of known devices.
The PM functions do not refer to any of the device's properties or its
type.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@vger.kernel.org
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-33-tzimmermann@suse.de

+3 -3
+3 -3
drivers/video/fbdev/core/fbmem.c
··· 1478 1478 INIT_LIST_HEAD(&fb_info->modelist); 1479 1479 1480 1480 if (fb_info->skip_vt_switch) 1481 - pm_vt_switch_required(fb_info->dev, false); 1481 + pm_vt_switch_required(fb_info->device, false); 1482 1482 else 1483 - pm_vt_switch_required(fb_info->dev, true); 1483 + pm_vt_switch_required(fb_info->device, true); 1484 1484 1485 1485 fb_var_to_videomode(&mode, &fb_info->var); 1486 1486 fb_add_videomode(&mode, &fb_info->modelist); ··· 1520 1520 1521 1521 device_destroy(fb_class, MKDEV(FB_MAJOR, i)); 1522 1522 1523 - pm_vt_switch_unregister(fb_info->dev); 1523 + pm_vt_switch_unregister(fb_info->device); 1524 1524 1525 1525 unbind_console(fb_info); 1526 1526