mfd: rtsx: Fix build warnings for !PM
authorThierry Reding <treding@nvidia.com>
Thu, 2 Oct 2014 07:25:17 +0000 (09:25 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 10 Nov 2014 15:21:59 +0000 (15:21 +0000)
rtsx_pci_power_off() is called only from rtsx_pci_suspend(), which isn't
built when PM is disabled.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rtsx_pcr.c

index f2643c221d345ebca0b7a9ff3266443ac1f0801b..30f7ca89a0e68619319f69dcebb12037f6e4af92 100644 (file)
@@ -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)
 {