Module Name:    src
Committed By:   christos
Date:           Sat Oct  6 15:33:35 UTC 2018

Modified Files:
        src/sys/external/bsd/drm2/dist/drm/i915: intel_panel.c

Log Message:
conditionally disable unused functions (clang)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
    src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c:1.11 src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c:1.12
--- src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c:1.11	Thu Sep 13 04:25:55 2018
+++ src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c	Sat Oct  6 11:33:35 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_panel.c,v 1.11 2018/09/13 08:25:55 mrg Exp $	*/
+/*	$NetBSD: intel_panel.c,v 1.12 2018/10/06 15:33:35 christos Exp $	*/
 
 /*
  * Copyright © 2006-2010 Intel Corporation
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.11 2018/09/13 08:25:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.12 2018/10/06 15:33:35 christos Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -432,6 +432,7 @@ static uint32_t scale(uint32_t source_va
 	return target_val;
 }
 
+#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
 /* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */
 static inline u32 scale_user_to_hw(struct intel_connector *connector,
 				   u32 user_level, u32 user_max)
@@ -441,6 +442,7 @@ static inline u32 scale_user_to_hw(struc
 	return scale(user_level, 0, user_max,
 		     panel->backlight.min, panel->backlight.max);
 }
+#endif
 
 /* Scale user_level in range [0..user_max] to [0..hw_max], clamping the result
  * to [hw_min..hw_max]. */
@@ -456,6 +458,7 @@ static inline u32 clamp_user_to_hw(struc
 	return hw_level;
 }
 
+#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
 /* Scale hw_level in range [hw_min..hw_max] to [0..user_max]. */
 static inline u32 scale_hw_to_user(struct intel_connector *connector,
 				   u32 hw_level, u32 user_max)
@@ -465,6 +468,7 @@ static inline u32 scale_hw_to_user(struc
 	return scale(hw_level, panel->backlight.min, panel->backlight.max,
 		     0, user_max);
 }
+#endif
 
 static u32 intel_panel_compute_brightness(struct intel_connector *connector,
 					  u32 val)

Reply via email to