]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
drm/msm: select REGULATOR
authorRob Clark <robdclark@gmail.com>
Fri, 31 Oct 2014 16:19:40 +0000 (12:19 -0400)
committerRob Clark <robdclark@gmail.com>
Sun, 16 Nov 2014 19:22:42 +0000 (14:22 -0500)
Fixes a potential error, spotted by Felipe with randconfig:

-----
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c: In function ‘mdp4_kms_init’:
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:2: error: implicit declaration \
        of function ‘devm_regulator_get_exclusive’ [-Werror=implicit-function-declaration]
  mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd");
  ^
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:16: error: assignment makes \
        pointer from integer without a cast [-Werror]
  mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd");
                ^
-----

Also add a brief comment explaining the use of _get_exclusive()

Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/Kconfig
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c

index 9d907c526c94d4df4d9a70a527678c2d58a743ff..5b2a1ff95d3de2ab1341dfa3fe6df3e0986e747e 100644 (file)
@@ -3,6 +3,7 @@ config DRM_MSM
        tristate "MSM DRM"
        depends on DRM
        depends on ARCH_QCOM || (ARM && COMPILE_TEST)
+       select REGULATOR
        select DRM_KMS_HELPER
        select DRM_PANEL
        select SHMEM
index 79d804e61cc44e48710f7a4703f38008e7a37b6c..ac204720429e9d4f363feb9b2b2165ade05dc6cc 100644 (file)
@@ -381,6 +381,10 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev)
        if (IS_ERR(mdp4_kms->dsi_pll_vddio))
                mdp4_kms->dsi_pll_vddio = NULL;
 
+       /* NOTE: driver for this regulator still missing upstream.. use
+        * _get_exclusive() and ignore the error if it does not exist
+        * (and hope that the bootloader left it on for us)
+        */
        mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd");
        if (IS_ERR(mdp4_kms->vdd))
                mdp4_kms->vdd = NULL;