]> 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 8af7f3b40baec4997422eb50912a10d1e80abf60..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;
@@ -497,7 +496,7 @@ static int imx_ldb_probe(struct platform_device *pdev)
                imx_ldb->ldb_ctrl |= LDB_SPLIT_MODE_EN;
 
        /*
-        * There are three diferent possible clock mux configurations:
+        * There are three different possible clock mux configurations:
         * i.MX53:  ipu1_di0_sel, ipu1_di1_sel
         * i.MX6q:  ipu1_di0_sel, ipu1_di1_sel, ipu2_di0_sel, ipu2_di1_sel
         * i.MX6dl: ipu1_di0_sel, ipu1_di1_sel, lcdif_sel
@@ -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;
                }
@@ -623,3 +622,4 @@ module_platform_driver(imx_ldb_driver);
 MODULE_DESCRIPTION("i.MX LVDS driver");
 MODULE_AUTHOR("Sascha Hauer, Pengutronix");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRIVER_NAME);