Commit f9309d1b authored by Joonyoung Shim's avatar Joonyoung Shim Committed by Inki Dae

drm/exynos: remove unnecessary type conversion of hdmi and mixer

When the void pointer type variable is assigned to the specific pointer
type variable, don't need to do type conversion.
Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 6b1c762d
...@@ -1194,7 +1194,7 @@ static int hdmi_conf_index(struct hdmi_context *hdata, ...@@ -1194,7 +1194,7 @@ static int hdmi_conf_index(struct hdmi_context *hdata,
static bool hdmi_is_connected(void *ctx) 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); u32 val = hdmi_reg_read(hdata, HDMI_HPD_STATUS);
if (val) if (val)
...@@ -1207,7 +1207,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector, ...@@ -1207,7 +1207,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector,
u8 *edid, int len) u8 *edid, int len)
{ {
struct edid *raw_edid; 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__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
...@@ -1275,7 +1275,7 @@ static int hdmi_v14_check_timing(struct fb_videomode *check_timing) ...@@ -1275,7 +1275,7 @@ static int hdmi_v14_check_timing(struct fb_videomode *check_timing)
static int hdmi_check_timing(void *ctx, void *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; struct fb_videomode *check_timing = timing;
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
...@@ -1914,7 +1914,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, ...@@ -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 *adjusted_mode)
{ {
struct drm_display_mode *m; struct drm_display_mode *m;
struct hdmi_context *hdata = (struct hdmi_context *)ctx; struct hdmi_context *hdata = ctx;
int index; int index;
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
...@@ -1951,7 +1951,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, ...@@ -1951,7 +1951,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector,
static void hdmi_mode_set(void *ctx, void *mode) 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; int conf_idx;
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
...@@ -1974,7 +1974,7 @@ static void hdmi_get_max_resol(void *ctx, unsigned int *width, ...@@ -1974,7 +1974,7 @@ static void hdmi_get_max_resol(void *ctx, unsigned int *width,
static void hdmi_commit(void *ctx) 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__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
...@@ -1985,7 +1985,7 @@ static void hdmi_commit(void *ctx) ...@@ -1985,7 +1985,7 @@ static void hdmi_commit(void *ctx)
static void hdmi_disable(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__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
...@@ -2020,7 +2020,7 @@ static void hdmi_hotplug_func(struct work_struct *work) ...@@ -2020,7 +2020,7 @@ static void hdmi_hotplug_func(struct work_struct *work)
static irqreturn_t hdmi_irq_handler(int irq, void *arg) static irqreturn_t hdmi_irq_handler(int irq, void *arg)
{ {
struct exynos_drm_hdmi_context *ctx = 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; u32 intc_flag;
intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG); intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG);
...@@ -2173,7 +2173,7 @@ static int hdmi_runtime_suspend(struct device *dev) ...@@ -2173,7 +2173,7 @@ static int hdmi_runtime_suspend(struct device *dev)
DRM_DEBUG_KMS("%s\n", __func__); DRM_DEBUG_KMS("%s\n", __func__);
hdmi_resource_poweroff((struct hdmi_context *)ctx->ctx); hdmi_resource_poweroff(ctx->ctx);
return 0; return 0;
} }
...@@ -2184,7 +2184,7 @@ static int hdmi_runtime_resume(struct device *dev) ...@@ -2184,7 +2184,7 @@ static int hdmi_runtime_resume(struct device *dev)
DRM_DEBUG_KMS("%s\n", __func__); DRM_DEBUG_KMS("%s\n", __func__);
hdmi_resource_poweron((struct hdmi_context *)ctx->ctx); hdmi_resource_poweron(ctx->ctx);
return 0; return 0;
} }
...@@ -2351,7 +2351,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev) ...@@ -2351,7 +2351,7 @@ static int __devinit hdmi_probe(struct platform_device *pdev)
static int __devexit hdmi_remove(struct platform_device *pdev) static int __devexit hdmi_remove(struct platform_device *pdev)
{ {
struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(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__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
......
...@@ -771,8 +771,7 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) ...@@ -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) static irqreturn_t mixer_irq_handler(int irq, void *arg)
{ {
struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg;
struct mixer_context *ctx = struct mixer_context *ctx = drm_hdmi_ctx->ctx;
(struct mixer_context *)drm_hdmi_ctx->ctx;
struct mixer_resources *res = &ctx->mixer_res; struct mixer_resources *res = &ctx->mixer_res;
u32 val, val_base; u32 val, val_base;
...@@ -902,7 +901,7 @@ static int mixer_runtime_resume(struct device *dev) ...@@ -902,7 +901,7 @@ static int mixer_runtime_resume(struct device *dev)
DRM_DEBUG_KMS("resume - start\n"); DRM_DEBUG_KMS("resume - start\n");
mixer_resource_poweron((struct mixer_context *)ctx->ctx); mixer_resource_poweron(ctx->ctx);
return 0; return 0;
} }
...@@ -913,7 +912,7 @@ static int mixer_runtime_suspend(struct device *dev) ...@@ -913,7 +912,7 @@ static int mixer_runtime_suspend(struct device *dev)
DRM_DEBUG_KMS("suspend - start\n"); DRM_DEBUG_KMS("suspend - start\n");
mixer_resource_poweroff((struct mixer_context *)ctx->ctx); mixer_resource_poweroff(ctx->ctx);
return 0; return 0;
} }
...@@ -926,8 +925,7 @@ static const struct dev_pm_ops mixer_pm_ops = { ...@@ -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, static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx,
struct platform_device *pdev) struct platform_device *pdev)
{ {
struct mixer_context *mixer_ctx = struct mixer_context *mixer_ctx = ctx->ctx;
(struct mixer_context *)ctx->ctx;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct mixer_resources *mixer_res = &mixer_ctx->mixer_res; struct mixer_resources *mixer_res = &mixer_ctx->mixer_res;
struct resource *res; struct resource *res;
...@@ -1093,7 +1091,7 @@ static int mixer_remove(struct platform_device *pdev) ...@@ -1093,7 +1091,7 @@ static int mixer_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct exynos_drm_hdmi_context *drm_hdmi_ctx = struct exynos_drm_hdmi_context *drm_hdmi_ctx =
platform_get_drvdata(pdev); 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"); dev_info(dev, "remove successful\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment