Re: [PATCH] mfd: intel-lpss: fix compilation issue if PM_SLEEP is not set

From: Andy Shevchenko
Date: Fri Jun 24 2016 - 04:29:14 EST


On Fri, 2016-06-24 at 03:11 +0300, Vladimir Zapolskiy wrote:
> If kernel build configuration has enabled CONFIG_PM and unset
> CONFIG_PM_SLEEP, then intel-lpss-pci.c and intel-lpss-acpi.c can not
> be compiled due to a missing INTEL_LPSS_SLEEP_PM_OPS macro
> declaration:
>
> Â drivers/mfd/intel-lpss-pci.c:63:8: error: undefined identifier
> 'INTEL_LPSS_SLEEP_PM_OPS'
> Â drivers/mfd/intel-lpss-pci.c:63:58: error: âINTEL_LPSS_SLEEP_PM_OPSâ
> undeclared here (not in a function)

And may I ask what ancient kernel you are using?

commit 47b91923ea41288751e83a5b080576085a831333
Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Date:ÂÂÂMon Sep 14 11:32:47 2015 +0300

ÂÂÂÂmfd: intel-lpss: Fix build error when !CONFIG_PM_SLEEP


>
> Fixes: d35dbf0dbaa7 ("mfd: Add support for Intel Sunrisepoint LPSS
> devices")
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@xxxxxxxxxx>
> ---
> Âdrivers/mfd/intel-lpss.h | 2 ++
> Â1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h
> index 764dc0d..0dcea9e 100644
> --- a/drivers/mfd/intel-lpss.h
> +++ b/drivers/mfd/intel-lpss.h
> @@ -44,6 +44,8 @@ int intel_lpss_resume(struct device *dev);
> Â .thaw = intel_lpss_resume, \
> Â .poweroff = intel_lpss_suspend, \
> Â .restore = intel_lpss_resume,
> +#else
> +#define INTEL_LPSS_SLEEP_PM_OPS
> Â#endif
> Â
> Â#define INTEL_LPSS_RUNTIME_PM_OPS \

--

Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy