]> git.sur5r.net Git - u-boot/commitdiff
video: exynos_dp: Remove callbacks from the driver
authorAjay Kumar <ajaykumar.rs@samsung.com>
Thu, 21 Feb 2013 23:52:58 +0000 (23:52 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 27 Mar 2013 12:17:15 +0000 (21:17 +0900)
Replaced the functionality of callbacks by using a standard set of functions.
Instead of implementing and hooking up a callback, put the same code in one of
the standard set of functions by overriding it.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/include/asm/arch-exynos/dp_info.h
board/samsung/smdk5250/smdk5250.c
drivers/video/exynos_dp.c

index 102b709bd76315d779c5c337c84990e691888bac..ff16361679f9fbf4a7fca7063d34e7e14ef0f645 100644 (file)
@@ -199,7 +199,6 @@ enum {
 
 struct exynos_dp_platform_data {
        struct edp_device_info *edp_dev_info;
-       void (*phy_enable)(unsigned int);
 };
 
 #ifdef CONFIG_EXYNOS_DP
index 9f467db67f5d280f55d6cd0d47688d204a2c9aa5..f45e485f31db2a30c86433f4fe5ba8b4ce0756e6 100644 (file)
@@ -503,6 +503,11 @@ vidinfo_t panel_info = {
        .dp_enabled     = 1,
 };
 
+void exynos_set_dp_phy(unsigned int onoff)
+{
+       set_dp_phy_ctrl(onoff);
+}
+
 static struct edp_device_info edp_info = {
        .disp_info = {
                .h_res = 2560,
@@ -533,7 +538,6 @@ static struct edp_device_info edp_info = {
 };
 
 static struct exynos_dp_platform_data dp_platform_data = {
-       .phy_enable     = set_dp_phy_ctrl,
        .edp_dev_info   = &edp_info,
 };
 
index d72fa565a7d0d479d5d3dc176506e1f3c999e10e..b2accc76c5fa853866386ad2591ed10d97093837 100644 (file)
 
 static struct exynos_dp_platform_data *dp_pd;
 
+void __exynos_set_dp_phy(unsigned int onoff)
+{
+}
+void exynos_set_dp_phy(unsigned int onoff)
+       __attribute__((weak, alias("__exynos_set_dp_phy")));
+
 static void exynos_dp_disp_info(struct edp_disp_info *disp_info)
 {
        disp_info->h_total = disp_info->h_res + disp_info->h_sync_width +
@@ -872,8 +878,7 @@ unsigned int exynos_init_dp(void)
 
        exynos_dp_disp_info(&edp_info->disp_info);
 
-       if (dp_pd->phy_enable)
-               dp_pd->phy_enable(1);
+       exynos_set_dp_phy(1);
 
        ret = exynos_dp_init_dp();
        if (ret != EXYNOS_DP_SUCCESS) {