]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/imx-drm/imx-ldb.c
imx-drm: use native mode if available rather than first in list
[karo-tx-linux.git] / drivers / staging / imx-drm / imx-ldb.c
index af733ea485656877e86cc9ae760846fa81deb3d0..fd87cda0ce484f3ec6e299de1b65f83c768ce0e0 100644 (file)
@@ -421,7 +421,7 @@ static const char *imx_ldb_bit_mappings[] = {
        [LVDS_BIT_MAP_JEIDA] = "jeida",
 };
 
-const int of_get_data_mapping(struct device_node *np)
+static const int of_get_data_mapping(struct device_node *np)
 {
        const char *bm;
        int ret, i;
@@ -466,8 +466,7 @@ static int imx_ldb_probe(struct platform_device *pdev)
 {
        struct device_node *np = pdev->dev.of_node;
        const struct of_device_id *of_id =
-                       of_match_device(of_match_ptr(imx_ldb_dt_ids),
-                                       &pdev->dev);
+                       of_match_device(imx_ldb_dt_ids, &pdev->dev);
        struct device_node *child;
        const u8 *edidp;
        struct imx_ldb *imx_ldb;
@@ -541,7 +540,7 @@ static int imx_ldb_probe(struct platform_device *pdev)
                        channel->edid = kmemdup(edidp, channel->edid_len,
                                                GFP_KERNEL);
                } else {
-                       ret = of_get_drm_display_mode(child, &channel->mode, 0);
+                       ret = of_get_drm_display_mode(child, &channel->mode, -1);
                        if (!ret)
                                channel->mode_valid = 1;
                }