Skip to content

Commit

Permalink
drm/exynos: use define instead of default_win member in struct mixer_…
Browse files Browse the repository at this point in the history
…context

The default_win member in struct mixer_context isn't change its value
after initialized to 0, so it's better using to define.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Joonyoung Shim authored and Inki Dae committed Apr 12, 2012
1 parent a634dd5 commit a2ee151
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/exynos/exynos_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "exynos_drm_hdmi.h"

#define MIXER_WIN_NR 3
#define MIXER_DEFAULT_WIN 0

#define get_mixer_context(dev) platform_get_drvdata(to_platform_device(dev))

Expand Down Expand Up @@ -75,7 +76,6 @@ struct mixer_resources {
};

struct mixer_context {
unsigned int default_win;
unsigned int irq;
int pipe;
bool interlace;
Expand Down Expand Up @@ -640,7 +640,7 @@ static void mixer_win_mode_set(void *ctx,

win = overlay->zpos;
if (win == DEFAULT_ZPOS)
win = mixer_ctx->default_win;
win = MIXER_DEFAULT_WIN;

if (win < 0 || win > MIXER_WIN_NR) {
DRM_ERROR("overlay plane[%d] is wrong\n", win);
Expand Down Expand Up @@ -680,7 +680,7 @@ static void mixer_win_commit(void *ctx, int zpos)
DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);

if (win == DEFAULT_ZPOS)
win = mixer_ctx->default_win;
win = MIXER_DEFAULT_WIN;

if (win < 0 || win > MIXER_WIN_NR) {
DRM_ERROR("overlay plane[%d] is wrong\n", win);
Expand All @@ -703,7 +703,7 @@ static void mixer_win_disable(void *ctx, int zpos)
DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win);

if (win == DEFAULT_ZPOS)
win = mixer_ctx->default_win;
win = MIXER_DEFAULT_WIN;

if (win < 0 || win > MIXER_WIN_NR) {
DRM_ERROR("overlay plane[%d] is wrong\n", win);
Expand Down

0 comments on commit a2ee151

Please sign in to comment.