linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pm: provide stubs for PM VT console switch routines
@ 2013-02-15 16:17 Jesse Barnes
  2013-02-15 17:00 ` [Intel-gfx] " Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2013-02-15 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-pm, intel-gfx

If PM_SLEEP is disabled, we need stub versions of these functions.

v2: fix up struct device forward decl.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 include/linux/pm.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/pm.h b/include/linux/pm.h
index 98310eb..e5da2f3 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -36,8 +36,17 @@ extern void (*pm_power_off)(void);
 extern void (*pm_power_off_prepare)(void);
 
 struct device; /* we have a circular dep with device.h */
+#ifdef CONFIG_VT_CONSOLE_SLEEP
 extern void pm_vt_switch_required(struct device *dev, bool required);
 extern void pm_vt_switch_unregister(struct device *dev);
+#else
+static inline void pm_vt_switch_required(struct device *dev, bool required)
+{
+}
+static inline void pm_vt_switch_unregister(struct device *dev)
+{
+}
+#endif /* CONFIG_VT_CONSOLE_SLEEP */
 
 /*
  * Device power management
-- 
1.7.9.5


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

* Re: [Intel-gfx] [PATCH] pm: provide stubs for PM VT console switch routines
  2013-02-15 16:17 [PATCH] pm: provide stubs for PM VT console switch routines Jesse Barnes
@ 2013-02-15 17:00 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2013-02-15 17:00 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-kernel, intel-gfx, linux-pm

On Fri, Feb 15, 2013 at 08:17:58AM -0800, Jesse Barnes wrote:
> If PM_SLEEP is disabled, we need stub versions of these functions.
> 
> v2: fix up struct device forward decl.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Ok, squashed into the old commit and tested. The trick is to disable
HIBERNATE and XEN support (since disabling VT_CONSOLE will also kill fbdev
support and so drm).
-Daniel

> ---
>  include/linux/pm.h |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index 98310eb..e5da2f3 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -36,8 +36,17 @@ extern void (*pm_power_off)(void);
>  extern void (*pm_power_off_prepare)(void);
>  
>  struct device; /* we have a circular dep with device.h */
> +#ifdef CONFIG_VT_CONSOLE_SLEEP
>  extern void pm_vt_switch_required(struct device *dev, bool required);
>  extern void pm_vt_switch_unregister(struct device *dev);
> +#else
> +static inline void pm_vt_switch_required(struct device *dev, bool required)
> +{
> +}
> +static inline void pm_vt_switch_unregister(struct device *dev)
> +{
> +}
> +#endif /* CONFIG_VT_CONSOLE_SLEEP */
>  
>  /*
>   * Device power management
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2013-02-15 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-15 16:17 [PATCH] pm: provide stubs for PM VT console switch routines Jesse Barnes
2013-02-15 17:00 ` [Intel-gfx] " Daniel Vetter

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).