Skip to content

Commit 491626f

Browse files
committed
drm/mipi-dsi: stop passing non struct drm_device to drm_err() and friends
The expectation is that the struct drm_device based logging helpers get passed an actual struct drm_device pointer rather than some random struct pointer where you can dereference the ->dev member. Convert drm_err(host, ...) to dev_err(host->dev, ...). This matches current usage, as struct drm_device is not available, but drops "[drm] *ERROR*" from logs. Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/842f97ade87d6f0c4b1de12e8ed5610a1b07fd8c.1737644530.git.jani.nikula@intel.com
1 parent c449f50 commit 491626f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/gpu/drm/drm_mipi_dsi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ of_mipi_dsi_device_add(struct mipi_dsi_host *host, struct device_node *node)
162162
u32 reg;
163163

164164
if (of_alias_from_compatible(node, info.type, sizeof(info.type)) < 0) {
165-
drm_err(host, "modalias failure on %pOF\n", node);
165+
dev_err(host->dev, "modalias failure on %pOF\n", node);
166166
return ERR_PTR(-EINVAL);
167167
}
168168

169169
ret = of_property_read_u32(node, "reg", &reg);
170170
if (ret) {
171-
drm_err(host, "device node %pOF has no valid reg property: %d\n",
171+
dev_err(host->dev, "device node %pOF has no valid reg property: %d\n",
172172
node, ret);
173173
return ERR_PTR(-EINVAL);
174174
}
@@ -206,18 +206,18 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,
206206
int ret;
207207

208208
if (!info) {
209-
drm_err(host, "invalid mipi_dsi_device_info pointer\n");
209+
dev_err(host->dev, "invalid mipi_dsi_device_info pointer\n");
210210
return ERR_PTR(-EINVAL);
211211
}
212212

213213
if (info->channel > 3) {
214-
drm_err(host, "invalid virtual channel: %u\n", info->channel);
214+
dev_err(host->dev, "invalid virtual channel: %u\n", info->channel);
215215
return ERR_PTR(-EINVAL);
216216
}
217217

218218
dsi = mipi_dsi_device_alloc(host);
219219
if (IS_ERR(dsi)) {
220-
drm_err(host, "failed to allocate DSI device %ld\n",
220+
dev_err(host->dev, "failed to allocate DSI device %ld\n",
221221
PTR_ERR(dsi));
222222
return dsi;
223223
}
@@ -228,7 +228,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,
228228

229229
ret = mipi_dsi_device_add(dsi);
230230
if (ret) {
231-
drm_err(host, "failed to add DSI device %d\n", ret);
231+
dev_err(host->dev, "failed to add DSI device %d\n", ret);
232232
kfree(dsi);
233233
return ERR_PTR(ret);
234234
}

0 commit comments

Comments
 (0)