Skip to contentSkip to conversation

HID: intel-ish-hid: Fix !CONFIG_PM build warning

PATCH Applied Borislav Petkov 3 participants 3 messages Oct 29, 2016 – Nov 3, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: intel-ish-hid: Fix !CONFIG_PM build warning

From: Borislav Petkov <[email protected]>

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.

Cc Srinivas Pandruvada <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Benjamin Tissoires <[email protected]>
Cc Wei Yongjun <[email protected]>
---
 drivers/hid/intel-ish-hid/ipc/pci-ish.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/intel-ish-hid/ipc/pci-ish.c +2 -2
index 42f0beeb09fd..7e3622a724aa 100644
@@ -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,
Signature · 1 line
2.10.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

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.

Quoted 6 lines
Cc Srinivas Pandruvada <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Benjamin Tissoires <[email protected]>
Cc Wei Yongjun <[email protected]>
Quoted 34 lines

---
 drivers/hid/intel-ish-hid/ipc/pci-ish.c | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/intel-ish-hid/ipc/pci-ish.c +0 -0
index 42f0beeb09fd..7e3622a724aa 100644
@@ -202,6 +202,7 @@ static void ish_remove(struct pci_dev *pdev)
  	kfree(ishtp_dev);
  }


+#ifdef CONFIG_PM
 static struct device *ish_resume_device;

 /**

drivers/hid/intel-ish-hid/ipc/pci-ish.c +0 -0
@@ -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,

drivers/hid/intel-ish-hid/ipc/pci-ish.c +1 -1
@@ -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,

maintainer Applied
#2 lore raw
In reply to Borislav Petkov
Quoted 11 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

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.

Applied to hid.git#for-4.9/upstream-fixes

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs