linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 24/30] fbdev/core: Pass Linux device to pm_vt_switch_*() functions
       [not found] <20230605144812.15241-1-tzimmermann@suse.de>
@ 2023-06-05 14:48 ` Thomas Zimmermann
  2023-06-07 19:25   ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Zimmermann @ 2023-06-05 14:48 UTC (permalink / raw)
  To: daniel, javierm, sam, deller, geert+renesas, lee, daniel.thompson,
	jingoohan1
  Cc: linux-fbdev, dri-devel, linux-sh, linux-omap, linux-staging,
	Thomas Zimmermann, Rafael J. Wysocki, Pavel Machek, linux-pm

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
---
 drivers/video/fbdev/core/fbmem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 329d16e49a90..f91ae7d4c94d 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1478,9 +1478,9 @@ static int do_register_framebuffer(struct fb_info *fb_info)
 		INIT_LIST_HEAD(&fb_info->modelist);
 
 	if (fb_info->skip_vt_switch)
-		pm_vt_switch_required(fb_info->dev, false);
+		pm_vt_switch_required(fb_info->device, false);
 	else
-		pm_vt_switch_required(fb_info->dev, true);
+		pm_vt_switch_required(fb_info->device, true);
 
 	fb_var_to_videomode(&mode, &fb_info->var);
 	fb_add_videomode(&mode, &fb_info->modelist);
@@ -1520,7 +1520,7 @@ static void unlink_framebuffer(struct fb_info *fb_info)
 
 	device_destroy(fb_class, MKDEV(FB_MAJOR, i));
 
-	pm_vt_switch_unregister(fb_info->dev);
+	pm_vt_switch_unregister(fb_info->device);
 
 	unbind_console(fb_info);
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 24/30] fbdev/core: Pass Linux device to pm_vt_switch_*() functions
  2023-06-05 14:48 ` [PATCH 24/30] fbdev/core: Pass Linux device to pm_vt_switch_*() functions Thomas Zimmermann
@ 2023-06-07 19:25   ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2023-06-07 19:25 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: daniel, javierm, deller, geert+renesas, lee, daniel.thompson,
	jingoohan1, linux-fbdev, dri-devel, linux-sh, linux-omap,
	linux-staging, Rafael J. Wysocki, Pavel Machek, linux-pm

On Mon, Jun 05, 2023 at 04:48:06PM +0200, Thomas Zimmermann wrote:
> 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>
> ---
>  drivers/video/fbdev/core/fbmem.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
> index 329d16e49a90..f91ae7d4c94d 100644
> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -1478,9 +1478,9 @@ static int do_register_framebuffer(struct fb_info *fb_info)
>  		INIT_LIST_HEAD(&fb_info->modelist);
>  
>  	if (fb_info->skip_vt_switch)
> -		pm_vt_switch_required(fb_info->dev, false);
> +		pm_vt_switch_required(fb_info->device, false);
>  	else
> -		pm_vt_switch_required(fb_info->dev, true);
> +		pm_vt_switch_required(fb_info->device, true);
>  
>  	fb_var_to_videomode(&mode, &fb_info->var);
>  	fb_add_videomode(&mode, &fb_info->modelist);
> @@ -1520,7 +1520,7 @@ static void unlink_framebuffer(struct fb_info *fb_info)
>  
>  	device_destroy(fb_class, MKDEV(FB_MAJOR, i));
>  
> -	pm_vt_switch_unregister(fb_info->dev);
> +	pm_vt_switch_unregister(fb_info->device);
>  
>  	unbind_console(fb_info);
>  
> -- 
> 2.40.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-07 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230605144812.15241-1-tzimmermann@suse.de>
2023-06-05 14:48 ` [PATCH 24/30] fbdev/core: Pass Linux device to pm_vt_switch_*() functions Thomas Zimmermann
2023-06-07 19:25   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).