Skip to content

Commit

Permalink
drm/exynos/dpi: stop using display->ctx pointer
Browse files Browse the repository at this point in the history
The patch replaces accesses to display->ctx pointer by container_of
construct. The field is removed as well as dpi was the last user of it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Andrzej Hajda authored and Inki Dae committed Nov 24, 2014
1 parent 4cfde1f commit 5af3d9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/exynos/exynos_drm_dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = {
static int exynos_dpi_create_connector(struct exynos_drm_display *display,
struct drm_encoder *encoder)
{
struct exynos_dpi *ctx = display->ctx;
struct exynos_dpi *ctx = display_to_dpi(display);
struct drm_connector *connector = &ctx->connector;
int ret;

Expand Down Expand Up @@ -147,7 +147,7 @@ static void exynos_dpi_poweroff(struct exynos_dpi *ctx)

static void exynos_dpi_dpms(struct exynos_drm_display *display, int mode)
{
struct exynos_dpi *ctx = display->ctx;
struct exynos_dpi *ctx = display_to_dpi(display);

switch (mode) {
case DRM_MODE_DPMS_ON:
Expand Down Expand Up @@ -307,7 +307,6 @@ struct exynos_drm_display *exynos_dpi_probe(struct device *dev)
ctx->display.type = EXYNOS_DISPLAY_TYPE_LCD;
ctx->display.ops = &exynos_dpi_display_ops;
ctx->dev = dev;
ctx->display.ctx = ctx;
ctx->dpms_mode = DRM_MODE_DPMS_OFF;

ret = exynos_drm_component_add(dev,
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/exynos/exynos_drm_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ struct exynos_drm_display {
struct drm_encoder *encoder;
struct drm_connector *connector;
struct exynos_drm_display_ops *ops;
void *ctx;
};

/*
Expand Down

0 comments on commit 5af3d9b

Please sign in to comment.