drm/imx: imx-ldb: check if channel is enabled before printing warning
authorLucas Stach <l.stach@pengutronix.de>
Wed, 11 Apr 2018 15:31:36 +0000 (17:31 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 16 Jul 2018 14:56:34 +0000 (16:56 +0200)
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>
drivers/gpu/drm/imx/imx-ldb.c

index 17974c0b4be84417afb227c0b5f9984c0f4e61d3..dd5312b02a8d21749fb004d41db74ff4bc511b1a 100644 (file)
@@ -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;