diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index d2b940c..a4344e8d 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -476,8 +476,10 @@ void omap_sram_idle(void)
 
 int omap3_can_sleep(void)
 {
+#ifdef CONFIG_PM_DEBUG
 	if (!sleep_while_idle)
 		return 0;
+#endif
 	if (!omap_uart_can_sleep())
 		return 0;
 	return 1;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 566e991..770fbf1 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -226,8 +226,10 @@ static void omap_uart_save_context(struct omap_uart_state *uart)
 	u16 lcr = 0;
 	struct plat_serial8250_port *p = uart->p;
 
+#ifdef CONFIG_PM_DEBUG
 	if (!enable_off_mode)
 		return;
+#endif
 
 	lcr = serial_read_reg(p, UART_LCR);
 	serial_write_reg(p, UART_LCR, 0xBF);
@@ -250,8 +252,10 @@ static void omap_uart_restore_context(struct omap_uart_state *uart)
 	u16 efr = 0;
 	struct plat_serial8250_port *p = uart->p;
 
+#ifdef CONFIG_PM_DEBUG
 	if (!enable_off_mode)
 		return;
+#endif
 
 	if (!uart->context_valid)
 		return;
