From: Lucas Stach Date: Wed, 11 Apr 2018 15:31:36 +0000 (+0200) Subject: drm/imx: imx-ldb: check if channel is enabled before printing warning X-Git-Tag: v4.19~298^2~8^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c80d673b91a6c81d765864e10f2b15110ee900ad;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Philipp Zabel --- diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 17974c0b..dd5312b 100644 --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c @@ -655,14 +655,14 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data) if (ret || i < 0 || i > 1) return -EINVAL; + if (!of_device_is_available(child)) + continue; + if (dual && i > 0) { dev_warn(dev, "dual-channel mode, ignoring second output\n"); continue; } - if (!of_device_is_available(child)) - continue; - channel = &imx_ldb->channel[i]; channel->ldb = imx_ldb; channel->chno = i;