Fix red and remove duplicated function declaration

Change-Id: I5fed7fdad077eedfc1e36fbd9e1669f11b90288d
diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h
index 326de4c..6d02979 100644
--- a/firmware/export/backlight.h
+++ b/firmware/export/backlight.h
@@ -64,10 +64,6 @@
 void lcd_awake(void);
 #endif
 
-#ifdef HAVE_LCD_SLEEP
-void lcd_awake(void);
-#endif
-
 #else /* !HAVE_BACKLIGHT */
 #define backlight_init()
 #endif /* !HAVE_BACKLIGHT */
diff --git a/firmware/target/hosted/sdl/lcd-bitmap.c b/firmware/target/hosted/sdl/lcd-bitmap.c
index aefbb17..0453435 100644
--- a/firmware/target/hosted/sdl/lcd-bitmap.c
+++ b/firmware/target/hosted/sdl/lcd-bitmap.c
@@ -162,7 +162,7 @@
 #endif
     }
 #else /* LCD_DEPTH > 8 */
-#ifdef HAVE_TRANSFLECTIVE_LCD
+#if defined(HAVE_TRANSFLECTIVE_LCD ) && defined(HAVE_LCD_SLEEP)
     if (!lcd_active())
         SDL_SetAlpha(lcd_surface, SDL_SRCALPHA, 0);
     else
diff --git a/uisimulator/common/lcd-common.c b/uisimulator/common/lcd-common.c
index 9e01f3e..c33e058 100644
--- a/uisimulator/common/lcd-common.c
+++ b/uisimulator/common/lcd-common.c
@@ -26,6 +26,10 @@
 #include "config.h"
 #include "system.h"
 #include "lcd.h"
+#if defined(HAVE_TRANSFLECTIVE_LCD) && defined(HAVE_LCD_ENABLE)
+/* in uisimulator/sdl/lcd-bitmap.c and lcd-charcell.c */
+extern void sim_backlight(int value);
+#endif
 
 #ifdef HAVE_LCD_ENABLE
 static bool lcd_enabled = false;
@@ -78,7 +82,7 @@
 void lcd_sleep(void)
 {
     lcd_sleeping = true;
-#ifdef HAVE_TRANSFLECTIVE_LCD
+#if defined(HAVE_TRANSFLECTIVE_LCD) && defined(HAVE_LCD_ENABLE)
     sim_backlight(0);   /* completely blacken the screen */
 #endif
 }