Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/gma500: remove unnecessary config_enabled() guard

Commit d112a8163f83 ("gma500/cdv: Add eDP support") replaced the
code inside this if-conditional with gma_backlight_set(), which
becomes a nop stub if CONFIG_BACKLIGHT_CLASS_DEVICE is disabled.
So, there is no need to guard the caller with config_enabled().

Note:
This is one of remaining TODOs to deprecate config_enabled() macro.
Refer to commit 97f2645f358b ("tree-wide: replace config_enabled()
with IS_ENABLED()").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1471970574-23906-1-git-send-email-yamada.masahiro@socionext.com

authored by

Masahiro Yamada and committed by
Daniel Vetter
b7a0c7c5 0d42204f

+1 -4
+1 -4
drivers/gpu/drm/gma500/opregion.c
··· 163 163 if (bclp > 255) 164 164 return ASLE_BACKLIGHT_FAILED; 165 165 166 - if (config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)) { 167 - int max = bd->props.max_brightness; 168 - gma_backlight_set(dev, bclp * max / 255); 169 - } 166 + gma_backlight_set(dev, bclp * bd->props.max_brightness / 255); 170 167 171 168 asle->cblv = (bclp * 0x64) / 0xff | ASLE_CBLV_VALID; 172 169