[PATCH] staging: most: video: replace pr_err with dev_err

Nils Lehnen posted 1 patch 1 week ago
drivers/staging/most/video/video.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[PATCH] staging: most: video: replace pr_err with dev_err
Posted by Nils Lehnen 1 week ago
The MOST core and the already converted net component log with device
context, while the video component still uses bare pr_err(), which
leaves its messages without any hint of the originating interface.
Both affected functions have the most_interface at hand, so log through
dev_err(iface->dev, ...) exactly like drivers/most/core.c does.

All English text in this patch (commit message and code comments) was
translated from a German draft with the assistance of Claude Fable 5.

Assisted-by: Claude:claude-fable-5 sparse
Signed-off-by: Nils Lehnen <nils.lehnen@proton.me>
---
Compile-tested only (x86, CONFIG_MOST_VIDEO=m; no MOST hardware
available).

 drivers/staging/most/video/video.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 78234620d48d..88892b5db28b 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -464,18 +464,18 @@ static int comp_probe_channel(struct most_interface *iface, int channel_idx,
 	struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);
 
 	if (mdev) {
-		pr_err("Channel already linked\n");
+		dev_err(iface->dev, "Channel already linked\n");
 		return -EEXIST;
 	}
 
 	if (ccfg->direction != MOST_CH_RX) {
-		pr_err("Wrong direction, expected rx\n");
+		dev_err(iface->dev, "Wrong direction, expected rx\n");
 		return -EINVAL;
 	}
 
 	if (ccfg->data_type != MOST_CH_SYNC &&
 	    ccfg->data_type != MOST_CH_ISOC) {
-		pr_err("Wrong channel type, expected sync or isoc\n");
+		dev_err(iface->dev, "Wrong channel type, expected sync or isoc\n");
 		return -EINVAL;
 	}
 
@@ -495,7 +495,7 @@ static int comp_probe_channel(struct most_interface *iface, int channel_idx,
 	strscpy(mdev->v4l2_dev.name, name, sizeof(mdev->v4l2_dev.name));
 	ret = v4l2_device_register(NULL, &mdev->v4l2_dev);
 	if (ret) {
-		pr_err("v4l2_device_register() failed\n");
+		dev_err(iface->dev, "v4l2_device_register() failed\n");
 		kfree(mdev);
 		return ret;
 	}
@@ -521,7 +521,7 @@ static int comp_disconnect_channel(struct most_interface *iface,
 	struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);
 
 	if (!mdev) {
-		pr_err("no such channel is linked\n");
+		dev_err(iface->dev, "no such channel is linked\n");
 		return -ENOENT;
 	}
 

base-commit: 64276d9bfe4d1fdd5cf2636f1065f7ea55c2defb
-- 
2.43.0