Skip to content

Commit

Permalink
drm/exynos: remove unnecessary type conversion of hdmi and mixer
Browse files Browse the repository at this point in the history
When the void pointer type variable is assigned to the specific pointer
type variable, don't need to do type conversion.

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 6b1c762 commit f9309d1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
22 changes: 11 additions & 11 deletions drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ static int hdmi_conf_index(struct hdmi_context *hdata,

static bool hdmi_is_connected(void *ctx)
{
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;
u32 val = hdmi_reg_read(hdata, HDMI_HPD_STATUS);

if (val)
Expand All @@ -1207,7 +1207,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector,
u8 *edid, int len)
{
struct edid *raw_edid;
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);

Expand Down Expand Up @@ -1275,7 +1275,7 @@ static int hdmi_v14_check_timing(struct fb_videomode *check_timing)

static int hdmi_check_timing(void *ctx, void *timing)
{
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;
struct fb_videomode *check_timing = timing;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
Expand Down Expand Up @@ -1914,7 +1914,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector,
struct drm_display_mode *adjusted_mode)
{
struct drm_display_mode *m;
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;
int index;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
Expand Down Expand Up @@ -1951,7 +1951,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector,

static void hdmi_mode_set(void *ctx, void *mode)
{
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;
int conf_idx;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
Expand All @@ -1974,7 +1974,7 @@ static void hdmi_get_max_resol(void *ctx, unsigned int *width,

static void hdmi_commit(void *ctx)
{
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);

Expand All @@ -1985,7 +1985,7 @@ static void hdmi_commit(void *ctx)

static void hdmi_disable(void *ctx)
{
struct hdmi_context *hdata = (struct hdmi_context *)ctx;
struct hdmi_context *hdata = ctx;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);

Expand Down Expand Up @@ -2020,7 +2020,7 @@ static void hdmi_hotplug_func(struct work_struct *work)
static irqreturn_t hdmi_irq_handler(int irq, void *arg)
{
struct exynos_drm_hdmi_context *ctx = arg;
struct hdmi_context *hdata = (struct hdmi_context *)ctx->ctx;
struct hdmi_context *hdata = ctx->ctx;
u32 intc_flag;

intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG);
Expand Down Expand Up @@ -2173,7 +2173,7 @@ static int hdmi_runtime_suspend(struct device *dev)

DRM_DEBUG_KMS("%s\n", __func__);

hdmi_resource_poweroff((struct hdmi_context *)ctx->ctx);
hdmi_resource_poweroff(ctx->ctx);

return 0;
}
Expand All @@ -2184,7 +2184,7 @@ static int hdmi_runtime_resume(struct device *dev)

DRM_DEBUG_KMS("%s\n", __func__);

hdmi_resource_poweron((struct hdmi_context *)ctx->ctx);
hdmi_resource_poweron(ctx->ctx);

return 0;
}
Expand Down Expand Up @@ -2351,7 +2351,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
static int __devexit hdmi_remove(struct platform_device *pdev)
{
struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev);
struct hdmi_context *hdata = (struct hdmi_context *)ctx->ctx;
struct hdmi_context *hdata = ctx->ctx;

DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);

Expand Down
12 changes: 5 additions & 7 deletions drivers/gpu/drm/exynos/exynos_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,7 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
static irqreturn_t mixer_irq_handler(int irq, void *arg)
{
struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg;
struct mixer_context *ctx =
(struct mixer_context *)drm_hdmi_ctx->ctx;
struct mixer_context *ctx = drm_hdmi_ctx->ctx;
struct mixer_resources *res = &ctx->mixer_res;
u32 val, val_base;

Expand Down Expand Up @@ -902,7 +901,7 @@ static int mixer_runtime_resume(struct device *dev)

DRM_DEBUG_KMS("resume - start\n");

mixer_resource_poweron((struct mixer_context *)ctx->ctx);
mixer_resource_poweron(ctx->ctx);

return 0;
}
Expand All @@ -913,7 +912,7 @@ static int mixer_runtime_suspend(struct device *dev)

DRM_DEBUG_KMS("suspend - start\n");

mixer_resource_poweroff((struct mixer_context *)ctx->ctx);
mixer_resource_poweroff(ctx->ctx);

return 0;
}
Expand All @@ -926,8 +925,7 @@ static const struct dev_pm_ops mixer_pm_ops = {
static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx,
struct platform_device *pdev)
{
struct mixer_context *mixer_ctx =
(struct mixer_context *)ctx->ctx;
struct mixer_context *mixer_ctx = ctx->ctx;
struct device *dev = &pdev->dev;
struct mixer_resources *mixer_res = &mixer_ctx->mixer_res;
struct resource *res;
Expand Down Expand Up @@ -1093,7 +1091,7 @@ static int mixer_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct exynos_drm_hdmi_context *drm_hdmi_ctx =
platform_get_drvdata(pdev);
struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx;
struct mixer_context *ctx = drm_hdmi_ctx->ctx;

dev_info(dev, "remove successful\n");

Expand Down

0 comments on commit f9309d1

Please sign in to comment.