We are going to want to re-use this before the component is bound, when
we don't yet have the device pointer (but we do have the of node).

Signed-off-by: Rob Clark <robin.cl...@oss.qualcomm.com>
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c 
b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 6b0390c38bff..504174dbe6d6 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -133,9 +133,8 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
        return NULL;
 }
 
-static int find_chipid(struct device *dev, uint32_t *chipid)
+static int find_chipid(struct device_node *node, uint32_t *chipid)
 {
-       struct device_node *node = dev->of_node;
        const char *compat;
        int ret;
 
@@ -169,11 +168,12 @@ static int find_chipid(struct device *dev, uint32_t 
*chipid)
        /* and if that fails, fall back to legacy "qcom,chipid" property: */
        ret = of_property_read_u32(node, "qcom,chipid", chipid);
        if (ret) {
-               DRM_DEV_ERROR(dev, "could not parse qcom,chipid: %d\n", ret);
+               DRM_ERROR("%s: could not parse qcom,chipid: %d\n",
+                         node->full_name, ret);
                return ret;
        }
 
-       dev_warn(dev, "Using legacy qcom,chipid binding!\n");
+       pr_warn("%s: Using legacy qcom,chipid binding!\n", node->full_name);
 
        return 0;
 }
@@ -187,7 +187,7 @@ static int adreno_bind(struct device *dev, struct device 
*master, void *data)
        struct msm_gpu *gpu;
        int ret;
 
-       ret = find_chipid(dev, &config.chip_id);
+       ret = find_chipid(dev->of_node, &config.chip_id);
        if (ret)
                return ret;
 
-- 
2.49.0

Reply via email to