arm: tegra: power: Fix build errors if PM_SLEEP is not selected
Scott Williams [Thu, 5 Jan 2012 20:12:32 +0000 (12:12 -0800)]
Change-Id: I2e7fa55c5d02ada3b203ec9627a4d91a5f17ca9b
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-on: http://git-master/r/73539
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
(cherry picked from commit e3b0a2205133e5209a9e35c2300c03d384b1ae2a)
Reviewed-on: http://git-master/r/73954
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/include/mach/io_dpd.h

index 16385b4..8d15379 100644 (file)
 #define __MACH_TEGRA_IO_DPD_H
 
 /* Tegra io dpd APIs */
+#ifdef CONFIG_PM_SLEEP
 struct tegra_io_dpd *tegra_io_dpd_get(struct device *dev); /* get handle */
 void tegra_io_dpd_enable(struct tegra_io_dpd *hnd); /* enable dpd */
 void tegra_io_dpd_disable(struct tegra_io_dpd *hnd); /* disable dpd */
+#else
+static inline struct tegra_io_dpd *tegra_io_dpd_get(struct device *dev)
+{
+       return NULL;
+}
+static inline void tegra_io_dpd_enable(struct tegra_io_dpd *hnd)
+{
+       /* Do nothing */
+}
+static inline void tegra_io_dpd_disable(struct tegra_io_dpd *hnd)
+{
+       /* Do nothing */
+}
+#endif
 
 #endif /* end __MACH_TEGRA_IO_DPD_H */