Skip to contentSkip to conversation

atmel-isi: Protect PM-only functions to kill warning

PATCH In review Geert Uytterhoeven 2 participants 2 messages Sep 6, 2015 – Sep 7, 2015

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

PATCH 1/1 atmel-isi: Protect PM-only functions to kill warning

If CONFIG_PM=n:

drivers/media/platform/soc_camera/atmel-isi.c:1044: warning: ‘atmel_isi_runtime_suspend’ defined but not used drivers/media/platform/soc_camera/atmel-isi.c:1054: warning: ‘atmel_isi_runtime_resume’ defined but not used

Protect the unused functions by #ifdef CONFIG_PM to fix this.

---
Resend with correct suject

---
 drivers/media/platform/soc_camera/atmel-isi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/platform/soc_camera/atmel-isi.c +2 -0
index 90701726a06a2e5c..ccf30ccbe389233f 100644
@@ -1040,6 +1040,7 @@ err_alloc_ctx:
 	return ret;
 }
 
+#ifdef CONFIG_PM
 static int atmel_isi_runtime_suspend(struct device *dev)
 {
 	struct soc_camera_host *soc_host = to_soc_camera_host(dev);
@@ -1058,6 +1059,7 @@ static int atmel_isi_runtime_resume(struct device *dev)
 
 	return clk_prepare_enable(isi->pclk);
 }
+#endif /* CONFIG_PM */
 
 static const struct dev_pm_ops atmel_isi_dev_pm_ops = {
 	SET_RUNTIME_PM_OPS(atmel_isi_runtime_suspend,
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw

Hi, Geert Uytterhoeven

Thanks for the patch.

Quoted 8 lines · Geert Uytterhoeven

If CONFIG_PM=n:

drivers/media/platform/soc_camera/atmel-isi.c:1044: warning: ‘atmel_isi_runtime_suspend’ defined but not used drivers/media/platform/soc_camera/atmel-isi.c:1054: warning: ‘atmel_isi_runtime_resume’ defined but not used

Protect the unused functions by #ifdef CONFIG_PM to fix this.

Best Regards,
Josh Wu

Quoted 26 lines

---
Resend with correct suject

---
  drivers/media/platform/soc_camera/atmel-isi.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/media/platform/soc_camera/atmel-isi.c +2 -0
index 90701726a06a2e5c..ccf30ccbe389233f 100644
@@ -1040,6 +1040,7 @@ err_alloc_ctx:
  	return ret;
  }
 
+#ifdef CONFIG_PM
  static int atmel_isi_runtime_suspend(struct device *dev)
  {
  	struct soc_camera_host *soc_host = to_soc_camera_host(dev);
@@ -1058,6 +1059,7 @@ static int atmel_isi_runtime_resume(struct device *dev)
 
  	return clk_prepare_enable(isi->pclk);
  }
+#endif /* CONFIG_PM */
 
  static const struct dev_pm_ops atmel_isi_dev_pm_ops = {
  	SET_RUNTIME_PM_OPS(atmel_isi_runtime_suspend,