drivers/gpu/drm/gma500/backlight.c: fix a defined-but-not-used warning for do_gma_bac...
authorDavid Howells <dhowells@redhat.com>
Thu, 23 Jan 2014 23:54:03 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:55 +0000 (16:36 -0800)
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.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/gma500/backlight.c

index 143eba3..ea7dfc5 100644 (file)
 #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)
 {