Skip to contentSkip to conversation

mfd: rtsx: Fix build warnings for !PM

PATCH Applied Thierry Reding 2 participants 2 messages Oct 2, 2014 – Oct 7, 2014 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: rtsx: Fix build warnings for !PM

From: Thierry Reding <[email protected]>

rtsx_pci_power_off() is called only from rtsx_pci_suspend(), which isn't built when PM is disabled.

---
 drivers/mfd/rtsx_pcr.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/rtsx_pcr.c +2 -0
index f2643c221d34..30f7ca89a0e6 100644
@@ -947,6 +947,7 @@ static void rtsx_pci_idle_work(struct work_struct *work)
 	mutex_unlock(&pcr->pcr_mutex);
 }
 
+#ifdef CONFIG_PM
 static void rtsx_pci_power_off(struct rtsx_pcr *pcr, u8 pm_state)
 {
 	if (pcr->ops->turn_off_led)
@@ -961,6 +962,7 @@ static void rtsx_pci_power_off(struct rtsx_pcr *pcr, u8 pm_state)
 	if (pcr->ops->force_power_down)
 		pcr->ops->force_power_down(pcr, pm_state);
 }
+#endif
 
 static int rtsx_pci_init_hw(struct rtsx_pcr *pcr)
 {
Signature · 1 line
2.1.0
Applied
#1 lore raw
Quoted 9 lines · Thierry Reding

From: Thierry Reding <[email protected]>

rtsx_pci_power_off() is called only from rtsx_pci_suspend(), which isn't built when PM is disabled.

---
 drivers/mfd/rtsx_pcr.c | 2 ++
 1 file changed, 2 insertions(+)

Applied to fixes.

Quoted 20 lines
drivers/mfd/rtsx_pcr.c +2 -0
index f2643c221d34..30f7ca89a0e6 100644
@@ -947,6 +947,7 @@ static void rtsx_pci_idle_work(struct work_struct *work)
 	mutex_unlock(&pcr->pcr_mutex);
 }
 
+#ifdef CONFIG_PM
 static void rtsx_pci_power_off(struct rtsx_pcr *pcr, u8 pm_state)
 {
 	if (pcr->ops->turn_off_led)
@@ -961,6 +962,7 @@ static void rtsx_pci_power_off(struct rtsx_pcr *pcr, u8 pm_state)
 	if (pcr->ops->force_power_down)
 		pcr->ops->force_power_down(pcr, pm_state);
 }
+#endif
 
 static int rtsx_pci_init_hw(struct rtsx_pcr *pcr)
 {
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog