Commit e435c608 authored by Chris Wilson's avatar Chris Wilson

drm/i915/gt: Fixup config ifdeffery for pm_suspend_target_state

pm_suspend_target_state is declared under CONFIG_PM_SLEEP but only
defined under CONFIG_SUSPEND. Play safe and only use the symbol if it is
both declared and defined.

Reported-by: kbuild-all@lists.01.org
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Fixes: a70a9e99 ("drm/i915: Defer rc6 shutdown to suspend_late")
Cc: Andi Shyti <andi.shyti@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191120182209.3967833-1-chris@chris-wilson.co.uk
parent 88cec497
...@@ -272,7 +272,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt) ...@@ -272,7 +272,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
static suspend_state_t pm_suspend_target(void) static suspend_state_t pm_suspend_target(void)
{ {
#if IS_ENABLED(CONFIG_PM_SLEEP) #if IS_ENABLED(CONFIG_SUSPEND) && IS_ENABLED(CONFIG_PM_SLEEP)
return pm_suspend_target_state; return pm_suspend_target_state;
#else #else
return PM_SUSPEND_TO_IDLE; return PM_SUSPEND_TO_IDLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment