Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 conditionally disable un...



details:   https://anonhg.NetBSD.org/src/rev/63ac117c31d4
branches:  trunk
changeset: 836254:63ac117c31d4
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 06 15:33:35 2018 +0000

description:
conditionally disable unused functions (clang)

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_panel.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 1f8b910de471 -r 63ac117c31d4 sys/external/bsd/drm2/dist/drm/i915/intel_panel.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Sat Oct 06 15:31:09 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Sat Oct 06 15:33:35 2018 +0000
@@ -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 @@
        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 @@
        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 @@
        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 @@
        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)



Home | Main Index | Thread Index | Old Index