drm/imx: imx-ldb: check if channel is enabled before printing warning

If the second LVDS channel has been disabled in the DT when using dual-channel
mode we should not print a warning.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Lucas Stach 2018-04-11 17:31:36 +02:00 committed by Philipp Zabel
parent b58262396f
commit c80d673b91

View file

@ -655,14 +655,14 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
if (ret || i < 0 || i > 1) if (ret || i < 0 || i > 1)
return -EINVAL; return -EINVAL;
if (!of_device_is_available(child))
continue;
if (dual && i > 0) { if (dual && i > 0) {
dev_warn(dev, "dual-channel mode, ignoring second output\n"); dev_warn(dev, "dual-channel mode, ignoring second output\n");
continue; continue;
} }
if (!of_device_is_available(child))
continue;
channel = &imx_ldb->channel[i]; channel = &imx_ldb->channel[i];
channel->ldb = imx_ldb; channel->ldb = imx_ldb;
channel->chno = i; channel->chno = i;