Skip to contentSkip to conversation

Fix a defined-but-not-used warning for do_gma_backlight_set()

PATCH In review David Howells 1 participant 1 message Jan 3, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/7 Fix a defined-but-not-used warning for do_gma_backlight_set()

Fix the following warning:

drivers/gpu/drm/gma500/backlight.c:29:13: warning: 'do_gma_backlight_set' defined but not used [-Wunused-function]

by moving the entire function inside the conditional section currently inside of it. All the places that call it are so conditionalised.

cc Alan Cox <[email protected]>
cc Greg Kroah-Hartman <[email protected]>

---

 drivers/gpu/drm/gma500/backlight.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/gma500/backlight.c +2 -2
index 143eba3309c5..d4f79bc3665e 100644
@@ -26,13 +26,13 @@
 #include "intel_bios.h"
 #include "power.h"
 
+#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
 static void do_gma_backlight_set(struct drm_device *dev)
 {
-#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
 	struct drm_psb_private *dev_priv = dev->dev_private;
 	backlight_update_status(dev_priv->backlight_device);
-#endif	
 }
+#endif	
 
 void gma_backlight_enable(struct drm_device *dev)
 {