Skip to content

Commit 1efb737

Browse files
author
Rob Clark
committed
drm/msm/adreno: Pass device_node to find_chipid()
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). v2: use %pOF Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/657705/
1 parent 1453b53 commit 1efb737

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/gpu/drm/msm/adreno/adreno_device.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
137137
return NULL;
138138
}
139139

140-
static int find_chipid(struct device *dev, uint32_t *chipid)
140+
static int find_chipid(struct device_node *node, uint32_t *chipid)
141141
{
142-
struct device_node *node = dev->of_node;
143142
const char *compat;
144143
int ret;
145144

@@ -173,11 +172,12 @@ static int find_chipid(struct device *dev, uint32_t *chipid)
173172
/* and if that fails, fall back to legacy "qcom,chipid" property: */
174173
ret = of_property_read_u32(node, "qcom,chipid", chipid);
175174
if (ret) {
176-
DRM_DEV_ERROR(dev, "could not parse qcom,chipid: %d\n", ret);
175+
DRM_ERROR("%pOF: could not parse qcom,chipid: %d\n",
176+
node, ret);
177177
return ret;
178178
}
179179

180-
dev_warn(dev, "Using legacy qcom,chipid binding!\n");
180+
pr_warn("%pOF: Using legacy qcom,chipid binding!\n", node);
181181

182182
return 0;
183183
}
@@ -191,7 +191,7 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
191191
struct msm_gpu *gpu;
192192
int ret;
193193

194-
ret = find_chipid(dev, &config.chip_id);
194+
ret = find_chipid(dev->of_node, &config.chip_id);
195195
if (ret)
196196
return ret;
197197

0 commit comments

Comments
 (0)