Patchwork [U-Boot,V3,2/4] EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM

login
register
mail settings
Submitter Ajay Kumar
Date Dec. 20, 2012, 12:35 p.m.
Message ID <1356006906-31510-3-git-send-email-ajaykumar.rs@samsung.com>
Download mbox | patch
Permalink /patch/207656/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Ajay Kumar - Dec. 20, 2012, 12:35 p.m.
When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM.
But if we do not select CONFIG_EXYNOS_MIPI_DSIM, exynos_fb.c throws
error saying exynos_mipi_dsi_init() not defined. So, we add
dummy definition for exynos_mipi_dsi_init when CONFIG_EXYNOS_MIPI_DSIM
is not defined.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 arch/arm/include/asm/arch-exynos/mipi_dsim.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Simon Glass - Dec. 20, 2012, 8:40 p.m.
Hi Ajay,

On Thu, Dec 20, 2012 at 4:35 AM, Ajay Kumar <ajaykumar.rs@samsung.com>wrote:

> When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM.
> But if we do not select CONFIG_EXYNOS_MIPI_DSIM, exynos_fb.c throws
> error saying exynos_mipi_dsi_init() not defined. So, we add
> dummy definition for exynos_mipi_dsi_init when CONFIG_EXYNOS_MIPI_DSIM
> is not defined.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  arch/arm/include/asm/arch-exynos/mipi_dsim.h |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> index 9a7cbeb..b73263d 100644
> --- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> +++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> @@ -358,7 +358,14 @@ struct mipi_dsim_lcd_driver {
>         void    (*mipi_display_on)(struct mipi_dsim_device *dsim_dev);
>  };
>
> +#ifdef CONFIG_EXYNOS_MIPI_DSIM
>  int exynos_mipi_dsi_init(void);
> +#else
> +int exynos_mipi_dsi_init(void)
>

Should this be static inline? I suppose it is included only once, but it
might be a good idea to add this.


> +{
> +       return 0;
> +}
> +#endif
>
>  /*
>   * register mipi_dsim_lcd_driver object defined by lcd panel driver
> --
> 1.7.1
>
>
Regards,
Simon
Donghwa Lee - Dec. 21, 2012, 1:47 a.m.
On 2012년 12월 20일 21:35, Ajay Kumar wrote:
> When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM.
> But if we do not select CONFIG_EXYNOS_MIPI_DSIM, exynos_fb.c throws
> error saying exynos_mipi_dsi_init() not defined. So, we add
> dummy definition for exynos_mipi_dsi_init when CONFIG_EXYNOS_MIPI_DSIM
> is not defined.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>   arch/arm/include/asm/arch-exynos/mipi_dsim.h |    7 +++++++
>   1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> index 9a7cbeb..b73263d 100644
> --- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> +++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
> @@ -358,7 +358,14 @@ struct mipi_dsim_lcd_driver {
>   	void	(*mipi_display_on)(struct mipi_dsim_device *dsim_dev);
>   };
>   
> +#ifdef CONFIG_EXYNOS_MIPI_DSIM
>   int exynos_mipi_dsi_init(void);
> +#else
> +int exynos_mipi_dsi_init(void)
> +{
> +	return 0;
> +}
> +#endif
>   
>   /*
>    * register mipi_dsim_lcd_driver object defined by lcd panel driver
It looks good to me.
Acked-by: Donghwa Lee <dh09.lee@samsung.com>

Thank you,
Donghwa Lee

Patch

diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
index 9a7cbeb..b73263d 100644
--- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
+++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
@@ -358,7 +358,14 @@  struct mipi_dsim_lcd_driver {
 	void	(*mipi_display_on)(struct mipi_dsim_device *dsim_dev);
 };
 
+#ifdef CONFIG_EXYNOS_MIPI_DSIM
 int exynos_mipi_dsi_init(void);
+#else
+int exynos_mipi_dsi_init(void)
+{
+	return 0;
+}
+#endif
 
 /*
  * register mipi_dsim_lcd_driver object defined by lcd panel driver