Commit ac767456 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm: omapdrm: hdmi4: Allocate the omap_hdmi data structure dynamically

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent 1f6b6b62
...@@ -389,4 +389,6 @@ struct omap_hdmi { ...@@ -389,4 +389,6 @@ struct omap_hdmi {
bool display_enabled; bool display_enabled;
}; };
#define dssdev_to_hdmi(dssdev) container_of(dssdev, struct omap_hdmi, output)
#endif #endif
This diff is collapsed.
...@@ -175,10 +175,10 @@ static int hdmi_cec_adap_enable(struct cec_adapter *adap, bool enable) ...@@ -175,10 +175,10 @@ static int hdmi_cec_adap_enable(struct cec_adapter *adap, bool enable)
REG_FLD_MOD(core->base, HDMI_CORE_SYS_INTR_UNMASK4, 0, 3, 3); REG_FLD_MOD(core->base, HDMI_CORE_SYS_INTR_UNMASK4, 0, 3, 3);
hdmi_wp_clear_irqenable(core->wp, HDMI_IRQ_CORE); hdmi_wp_clear_irqenable(core->wp, HDMI_IRQ_CORE);
hdmi_wp_set_irqstatus(core->wp, HDMI_IRQ_CORE); hdmi_wp_set_irqstatus(core->wp, HDMI_IRQ_CORE);
hdmi4_core_disable(NULL); hdmi4_core_disable(core);
return 0; return 0;
} }
err = hdmi4_core_enable(NULL); err = hdmi4_core_enable(core);
if (err) if (err)
return err; return err;
......
...@@ -266,8 +266,8 @@ void hdmi4_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp, ...@@ -266,8 +266,8 @@ void hdmi4_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp,
void hdmi4_core_dump(struct hdmi_core_data *core, struct seq_file *s); void hdmi4_core_dump(struct hdmi_core_data *core, struct seq_file *s);
int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core); int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core);
int hdmi4_core_enable(struct omap_dss_device *dssdev); int hdmi4_core_enable(struct hdmi_core_data *core);
void hdmi4_core_disable(struct omap_dss_device *dssdev); void hdmi4_core_disable(struct hdmi_core_data *core);
void hdmi4_core_powerdown_disable(struct hdmi_core_data *core); void hdmi4_core_powerdown_disable(struct hdmi_core_data *core);
int hdmi4_audio_start(struct hdmi_core_data *core, struct hdmi_wp_data *wp); int hdmi4_audio_start(struct hdmi_core_data *core, struct hdmi_wp_data *wp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment