[PATCH 31/48] drm: omapdrm: hdmi4: Allocate the omap_hdmi data structure dynamically

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Oct 16 11:17:56 UTC 2017


Hi Sebastian,

On Monday, 16 October 2017 13:27:57 EEST Sebastian Reichel wrote:
> Hi,
> 
> On Fri, Oct 13, 2017 at 05:59:27PM +0300, Laurent Pinchart wrote:
> > The omap_hdmi private data structure is currently stored as a global
> > variable. While no platform with multiple HDMI4 encoders currently
> > exists nor is planned, this doesn't comply with the kernel device model
> > and should thus be fixed.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> 
> [...]
> 
> > -static void hdmi_init_output(struct platform_device *pdev)
> > +static void hdmi_init_output(struct omap_hdmi *hdmi)
> >  {
> > -	struct omap_dss_device *out = &hdmi.output;
> > +	struct omap_dss_device *out = &hdmi->output;
> > 
> > -	out->dev = &pdev->dev;
> > +	out->dev = &hdmi->pdev->dev;
> >  	out->id = OMAP_DSS_OUTPUT_HDMI;
> >  	out->output_type = OMAP_DISPLAY_TYPE_HDMI;
> > -	out->name = "hdmi.0";
> > +	out->name = "hdmi->0";
> 
> I guess this was an unintended side-effect of "s/hdmi./hdmi->/g"?

Indeed. I'll fix it in v2, as well as the same mistake in patch 32/48.

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list