disp: msm: avoid using #ifdef for configurations

Use #if IS_ENABLED() instead of #ifdef for configurations as vendor module
guidelines.

Use #if IS_ENABLED(CONFIG_XXX) instead of #ifdef CONFIG_XXX to ensure that
the code inside the #if block continues to compile if the config changes
to a tristate config in the future.

The differences are as follows:
	1.#if IS_ENABLED(CONFIG_XXX) evaluates to true when CONFIG_XXX is set to
		module (=m) or built-in (=y).
	2.#ifdef CONFIG_XXX evaluates to true when CONFIG_XXX is set to
		built-in(=y) , but doesn't when CONFIG_XXX is set to module(=m).
		Use this only when you're certain you want to do the same thing
		when the config is set to module or is disabled.

Change-Id: Ia806b9b01ad8414d0e4de027a382cb68e7fb4a6a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
此提交包含在:
GG Hou
2021-12-07 16:10:51 +08:00
父節點 f42f39e4f8
當前提交 e29493c71d
共有 29 個檔案被更改,包括 97 行新增82 行删除

查看文件

@@ -4695,7 +4695,7 @@ int sde_encoder_helper_collect_misr(struct sde_encoder_phys *phys_enc,
nonblock, misr_value) : -ENOTSUPP;
}
#ifdef CONFIG_DEBUG_FS
#if IS_ENABLED(CONFIG_DEBUG_FS)
static int _sde_encoder_status_show(struct seq_file *s, void *data)
{
struct sde_encoder_virt *sde_enc;
@@ -4966,7 +4966,7 @@ static int _sde_encoder_init_debugfs(struct drm_encoder *drm_enc)
static void _sde_encoder_destroy_debugfs(struct drm_encoder *drm_enc)
{
}
#endif
#endif /* CONFIG_DEBUG_FS */
static int sde_encoder_late_register(struct drm_encoder *encoder)
{