Re: [PATCH] HID: intel-ish-hid: Fix !CONFIG_PM build warning
From: Srinivas Pandruvada
Date: Sat Oct 29 2016 - 11:53:57 EST
On Sat, 2016-10-29 at 13:17 +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> Fix
>
> Â drivers/hid/intel-ish-hid/ipc/pci-ish.c:247:12: warning:
> âish_suspendâ defined but not used [-Wunused-function]
> ÂÂÂstatic int ish_suspend(struct device *device)
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ^
> Â drivers/hid/intel-ish-hid/ipc/pci-ish.c:282:12: warning:
> âish_resumeâ defined but not used [-Wunused-function]
> ÂÂÂstatic int ish_resume(struct device *device)
> ÂÂÂÂÂÂÂÂÂÂÂÂ^
> by sticking them in the CONFIG_PM range too.
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> Cc: Jiri Kosina <jikos@xxxxxxxxxx>
> Cc: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
> Cc: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
> Cc: linux-input@xxxxxxxxxxxxxxx
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>-
> ---
> Âdrivers/hid/intel-ish-hid/ipc/pci-ish.c | 4 ++--
> Â1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> index 42f0beeb09fd..7e3622a724aa 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> @@ -202,6 +202,7 @@ static void ish_remove(struct pci_dev *pdev)
> Â kfree(ishtp_dev);
> Â}
> Â
> +#ifdef CONFIG_PM
> Âstatic struct device *ish_resume_device;
> Â
> Â/**
> @@ -293,7 +294,6 @@ static int ish_resume(struct device *device)
> Â return 0;
> Â}
> Â
> -#ifdef CONFIG_PM
> Âstatic const struct dev_pm_ops ish_pm_ops = {
> Â .suspend = ish_suspend,
> Â .resume = ish_resume,
> @@ -301,7 +301,7 @@ static const struct dev_pm_ops ish_pm_ops = {
> Â#define ISHTP_ISH_PM_OPS (&ish_pm_ops)
> Â#else
> Â#define ISHTP_ISH_PM_OPS NULL
> -#endif
> +#endif /* CONFIG_PM */
> Â
> Âstatic struct pci_driver ish_driver = {
> Â .name = KBUILD_MODNAME,