From: Andrzej Hajda Date: Tue, 6 Sep 2016 09:20:32 +0000 (+0200) Subject: drm/panel/s6e3ha2: remove redundant definition of VINT_STATUS_MAX X-Git-Tag: submit/tizen/20160926.022655~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea57f65d76af6f4143d8ff53d888281f4dc94639;p=platform%2Fkernel%2Flinux-exynos.git drm/panel/s6e3ha2: remove redundant definition of VINT_STATUS_MAX VINT_STATUS_MAX is equal to size of VINT_TABLE, so it can be replaced be ARRAY_SIZE macro. Change-Id: I5c6ee3ec4a9827e844f89d0d85ccb18f785378aa Signed-off-by: Andrzej Hajda --- diff --git a/drivers/gpu/drm/panel/panel-s6e3ha2.c b/drivers/gpu/drm/panel/panel-s6e3ha2.c index 62bd3f4332d5..f3b622a28b88 100644 --- a/drivers/gpu/drm/panel/panel-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -28,7 +28,6 @@ #define MAX_GAMMA 350 #define NUM_GAMMA_STEPS 46 #define GAMMA_CMD_CNT 35 -#define VINT_STATUS_MAX 10 static const u8 MDNIE_6500K[] = { 0xec, 0x98, 0x24, 0x10, 0x14, 0xb3, 0x01, 0x0e, 0x01, 0x00, @@ -255,7 +254,7 @@ static const u8 gamma_tbl[NUM_GAMMA_STEPS][GAMMA_CMD_CNT] = { 0x00, 0x00 } }; -unsigned char VINT_TABLE[VINT_STATUS_MAX] = { +unsigned char VINT_TABLE[] = { 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21 }; @@ -533,7 +532,7 @@ static int s6e3ha2_get_brightness(struct backlight_device *bl_dev) static void s6e3ha2_set_vint(struct s6e3ha2 *ctx) { - int vind = (VINT_STATUS_MAX - 1) + int vind = (ARRAY_SIZE(VINT_TABLE) - 1) * ctx->bl_dev->props.brightness / MAX_BRIGHTNESS; s6e3ha2_dcs_write_seq(ctx, 0xf4, 0x8b, VINT_TABLE[vind]);