Skip to content

Commit a9e1ba0

Browse files
jnikulalutzbichler
authored andcommitted
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 <[email protected]> Reviewed-by: Luca Ceresoli <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/842f97ade87d6f0c4b1de12e8ed5610a1b07fd8c.1737644530.git.jani.nikula@intel.com
1 parent 49d0732 commit a9e1ba0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/gpu/drm/drm_mipi_dsi.c

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

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

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

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

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

219219
dsi = mipi_dsi_device_alloc(host);
220220
if (IS_ERR(dsi)) {
221-
drm_err(host, "failed to allocate DSI device %ld\n",
221+
dev_err(host->dev, "failed to allocate DSI device %ld\n",
222222
PTR_ERR(dsi));
223223
return dsi;
224224
}
@@ -229,7 +229,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,
229229

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

0 commit comments

Comments
 (0)