diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index d5304a2f8f11..c33b7a55954d 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3518,19 +3518,6 @@ int dw_hdmi_bind(struct device *dev, struct device *master, hdmi_writeb(hdmi, ~(HDMI_IH_PHY_STAT0_HPD | HDMI_IH_PHY_STAT0_RX_SENSE), HDMI_IH_MUTE_PHY_STAT0); - if (config0 & HDMI_CONFIG0_CEC) { - cec.hdmi = hdmi; - cec.ops = &dw_hdmi_cec_ops; - cec.irq = irq; - - pdevinfo.name = "dw-hdmi-cec"; - pdevinfo.data = &cec; - pdevinfo.size_data = sizeof(cec); - pdevinfo.dma_mask = 0; - - hdmi->cec = platform_device_register_full(&pdevinfo); - } - /* Unmute I2CM interrupts and reset HDMI DDC I2C master controller */ if (hdmi->i2c) dw_hdmi_i2c_init(hdmi); @@ -3571,6 +3558,19 @@ int dw_hdmi_bind(struct device *dev, struct device *master, hdmi->audio = platform_device_register_full(&pdevinfo); } + if (config0 & HDMI_CONFIG0_CEC) { + cec.hdmi = hdmi; + cec.ops = &dw_hdmi_cec_ops; + cec.irq = irq; + + pdevinfo.name = "dw-hdmi-cec"; + pdevinfo.data = &cec; + pdevinfo.size_data = sizeof(cec); + pdevinfo.dma_mask = 0; + + hdmi->cec = platform_device_register_full(&pdevinfo); + } + dev_set_drvdata(dev, hdmi); dw_hdmi_register_debugfs(dev, hdmi);