OSDN Git Service

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 17974c0..dd5312b 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;