[PATCH v2 1/2] drm/bridge: make dw_mipi_dsi.h self-contained

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun May 19 21:15:38 UTC 2019


Hi Sam,

Thank you for the patch.

On Sun, May 19, 2019 at 08:36:35PM +0200, Sam Ravnborg wrote:
> To allow users to include dw_mipi_dsi.h without pulling in dependencies
> make dw_mipi_dsi.h self-contained.
> Use forward declarations when possible.
> 
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Andrzej Hajda <a.hajda at samsung.com>
> Cc: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Peter Senna Tschudin <peter.senna at gmail.com>
> Cc: Martin Donnelly <martin.donnelly at ge.com>
> Cc: Martyn Welch <martyn.welch at collabora.co.uk>
> ---
>  include/drm/bridge/dw_mipi_dsi.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/drm/bridge/dw_mipi_dsi.h b/include/drm/bridge/dw_mipi_dsi.h
> index 7d3dd69a5caa..825c222afbfc 100644
> --- a/include/drm/bridge/dw_mipi_dsi.h
> +++ b/include/drm/bridge/dw_mipi_dsi.h
> @@ -9,8 +9,16 @@
>  
>  #ifndef __DW_MIPI_DSI__
>  #define __DW_MIPI_DSI__
> +#include <linux/types.h>
>  
> +struct drm_display_mode;
> +struct drm_encoder;
>  struct dw_mipi_dsi;
> +struct dw_mipi_dsi_host_ops;
> +struct dw_mipi_dsi_phy_ops;
> +struct dw_mipi_dsi_plat_data;

No need to forward-declare these three structures, they're defined in
this very .h file.

> +struct mipi_dsi_device;
> +struct platform_device;

You need to pull in drm/modes.h for drm_mode_status.

Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

>  
>  struct dw_mipi_dsi_phy_ops {
>  	int (*init)(void *priv_data);

-- 
Regards,

Laurent Pinchart


More information about the dri-devel mailing list