diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2012-04-05 07:49:22 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-04-12 01:51:16 -0400 |
commit | f9309d1bf220122659328040db47eede32514656 (patch) | |
tree | e611a15e167289b1496eefb612a7afeec9afebb3 /drivers/gpu/drm/exynos | |
parent | 6b1c762da98fd0d475a4539f94541aec91a8de30 (diff) |
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: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 22 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 12 |
2 files changed, 16 insertions, 18 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 575a8cbd3533..0a713174535e 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
@@ -1194,7 +1194,7 @@ static int hdmi_conf_index(struct hdmi_context *hdata, | |||
1194 | 1194 | ||
1195 | static bool hdmi_is_connected(void *ctx) | 1195 | static bool hdmi_is_connected(void *ctx) |
1196 | { | 1196 | { |
1197 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1197 | struct hdmi_context *hdata = ctx; |
1198 | u32 val = hdmi_reg_read(hdata, HDMI_HPD_STATUS); | 1198 | u32 val = hdmi_reg_read(hdata, HDMI_HPD_STATUS); |
1199 | 1199 | ||
1200 | if (val) | 1200 | if (val) |
@@ -1207,7 +1207,7 @@ static int hdmi_get_edid(void *ctx, struct drm_connector *connector, | |||
1207 | u8 *edid, int len) | 1207 | u8 *edid, int len) |
1208 | { | 1208 | { |
1209 | struct edid *raw_edid; | 1209 | struct edid *raw_edid; |
1210 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1210 | struct hdmi_context *hdata = ctx; |
1211 | 1211 | ||
1212 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 1212 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
1213 | 1213 | ||
@@ -1275,7 +1275,7 @@ static int hdmi_v14_check_timing(struct fb_videomode *check_timing) | |||
1275 | 1275 | ||
1276 | static int hdmi_check_timing(void *ctx, void *timing) | 1276 | static int hdmi_check_timing(void *ctx, void *timing) |
1277 | { | 1277 | { |
1278 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1278 | struct hdmi_context *hdata = ctx; |
1279 | struct fb_videomode *check_timing = timing; | 1279 | struct fb_videomode *check_timing = timing; |
1280 | 1280 | ||
1281 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 1281 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
@@ -1914,7 +1914,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, | |||
1914 | struct drm_display_mode *adjusted_mode) | 1914 | struct drm_display_mode *adjusted_mode) |
1915 | { | 1915 | { |
1916 | struct drm_display_mode *m; | 1916 | struct drm_display_mode *m; |
1917 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1917 | struct hdmi_context *hdata = ctx; |
1918 | int index; | 1918 | int index; |
1919 | 1919 | ||
1920 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 1920 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
@@ -1951,7 +1951,7 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, | |||
1951 | 1951 | ||
1952 | static void hdmi_mode_set(void *ctx, void *mode) | 1952 | static void hdmi_mode_set(void *ctx, void *mode) |
1953 | { | 1953 | { |
1954 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1954 | struct hdmi_context *hdata = ctx; |
1955 | int conf_idx; | 1955 | int conf_idx; |
1956 | 1956 | ||
1957 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 1957 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
@@ -1974,7 +1974,7 @@ static void hdmi_get_max_resol(void *ctx, unsigned int *width, | |||
1974 | 1974 | ||
1975 | static void hdmi_commit(void *ctx) | 1975 | static void hdmi_commit(void *ctx) |
1976 | { | 1976 | { |
1977 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1977 | struct hdmi_context *hdata = ctx; |
1978 | 1978 | ||
1979 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 1979 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
1980 | 1980 | ||
@@ -1985,7 +1985,7 @@ static void hdmi_commit(void *ctx) | |||
1985 | 1985 | ||
1986 | static void hdmi_disable(void *ctx) | 1986 | static void hdmi_disable(void *ctx) |
1987 | { | 1987 | { |
1988 | struct hdmi_context *hdata = (struct hdmi_context *)ctx; | 1988 | struct hdmi_context *hdata = ctx; |
1989 | 1989 | ||
1990 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 1990 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
1991 | 1991 | ||
@@ -2020,7 +2020,7 @@ static void hdmi_hotplug_func(struct work_struct *work) | |||
2020 | static irqreturn_t hdmi_irq_handler(int irq, void *arg) | 2020 | static irqreturn_t hdmi_irq_handler(int irq, void *arg) |
2021 | { | 2021 | { |
2022 | struct exynos_drm_hdmi_context *ctx = arg; | 2022 | struct exynos_drm_hdmi_context *ctx = arg; |
2023 | struct hdmi_context *hdata = (struct hdmi_context *)ctx->ctx; | 2023 | struct hdmi_context *hdata = ctx->ctx; |
2024 | u32 intc_flag; | 2024 | u32 intc_flag; |
2025 | 2025 | ||
2026 | intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG); | 2026 | intc_flag = hdmi_reg_read(hdata, HDMI_INTC_FLAG); |
@@ -2173,7 +2173,7 @@ static int hdmi_runtime_suspend(struct device *dev) | |||
2173 | 2173 | ||
2174 | DRM_DEBUG_KMS("%s\n", __func__); | 2174 | DRM_DEBUG_KMS("%s\n", __func__); |
2175 | 2175 | ||
2176 | hdmi_resource_poweroff((struct hdmi_context *)ctx->ctx); | 2176 | hdmi_resource_poweroff(ctx->ctx); |
2177 | 2177 | ||
2178 | return 0; | 2178 | return 0; |
2179 | } | 2179 | } |
@@ -2184,7 +2184,7 @@ static int hdmi_runtime_resume(struct device *dev) | |||
2184 | 2184 | ||
2185 | DRM_DEBUG_KMS("%s\n", __func__); | 2185 | DRM_DEBUG_KMS("%s\n", __func__); |
2186 | 2186 | ||
2187 | hdmi_resource_poweron((struct hdmi_context *)ctx->ctx); | 2187 | hdmi_resource_poweron(ctx->ctx); |
2188 | 2188 | ||
2189 | return 0; | 2189 | return 0; |
2190 | } | 2190 | } |
@@ -2351,7 +2351,7 @@ err_data: | |||
2351 | static int __devexit hdmi_remove(struct platform_device *pdev) | 2351 | static int __devexit hdmi_remove(struct platform_device *pdev) |
2352 | { | 2352 | { |
2353 | struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); | 2353 | struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); |
2354 | struct hdmi_context *hdata = (struct hdmi_context *)ctx->ctx; | 2354 | struct hdmi_context *hdata = ctx->ctx; |
2355 | 2355 | ||
2356 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 2356 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
2357 | 2357 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 4d5f41e19527..495a7afea962 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -771,8 +771,7 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) | |||
771 | static irqreturn_t mixer_irq_handler(int irq, void *arg) | 771 | static irqreturn_t mixer_irq_handler(int irq, void *arg) |
772 | { | 772 | { |
773 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; | 773 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; |
774 | struct mixer_context *ctx = | 774 | struct mixer_context *ctx = drm_hdmi_ctx->ctx; |
775 | (struct mixer_context *)drm_hdmi_ctx->ctx; | ||
776 | struct mixer_resources *res = &ctx->mixer_res; | 775 | struct mixer_resources *res = &ctx->mixer_res; |
777 | u32 val, val_base; | 776 | u32 val, val_base; |
778 | 777 | ||
@@ -902,7 +901,7 @@ static int mixer_runtime_resume(struct device *dev) | |||
902 | 901 | ||
903 | DRM_DEBUG_KMS("resume - start\n"); | 902 | DRM_DEBUG_KMS("resume - start\n"); |
904 | 903 | ||
905 | mixer_resource_poweron((struct mixer_context *)ctx->ctx); | 904 | mixer_resource_poweron(ctx->ctx); |
906 | 905 | ||
907 | return 0; | 906 | return 0; |
908 | } | 907 | } |
@@ -913,7 +912,7 @@ static int mixer_runtime_suspend(struct device *dev) | |||
913 | 912 | ||
914 | DRM_DEBUG_KMS("suspend - start\n"); | 913 | DRM_DEBUG_KMS("suspend - start\n"); |
915 | 914 | ||
916 | mixer_resource_poweroff((struct mixer_context *)ctx->ctx); | 915 | mixer_resource_poweroff(ctx->ctx); |
917 | 916 | ||
918 | return 0; | 917 | return 0; |
919 | } | 918 | } |
@@ -926,8 +925,7 @@ static const struct dev_pm_ops mixer_pm_ops = { | |||
926 | static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, | 925 | static int __devinit mixer_resources_init(struct exynos_drm_hdmi_context *ctx, |
927 | struct platform_device *pdev) | 926 | struct platform_device *pdev) |
928 | { | 927 | { |
929 | struct mixer_context *mixer_ctx = | 928 | struct mixer_context *mixer_ctx = ctx->ctx; |
930 | (struct mixer_context *)ctx->ctx; | ||
931 | struct device *dev = &pdev->dev; | 929 | struct device *dev = &pdev->dev; |
932 | struct mixer_resources *mixer_res = &mixer_ctx->mixer_res; | 930 | struct mixer_resources *mixer_res = &mixer_ctx->mixer_res; |
933 | struct resource *res; | 931 | struct resource *res; |
@@ -1093,7 +1091,7 @@ static int mixer_remove(struct platform_device *pdev) | |||
1093 | struct device *dev = &pdev->dev; | 1091 | struct device *dev = &pdev->dev; |
1094 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = | 1092 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = |
1095 | platform_get_drvdata(pdev); | 1093 | platform_get_drvdata(pdev); |
1096 | struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx; | 1094 | struct mixer_context *ctx = drm_hdmi_ctx->ctx; |
1097 | 1095 | ||
1098 | dev_info(dev, "remove successful\n"); | 1096 | dev_info(dev, "remove successful\n"); |
1099 | 1097 | ||