summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-06 21:35:51 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 09:43:09 +0300
commit552b07b56eba3e7883a69aa0aad80f2c09d87cc1 (patch)
tree7f35407ff38e0ee2121a1854f9589350b143b6c2 /drivers/media
parentd01a7fea9d7e48eefe1b85a8706fe4bed06589db (diff)
downloadlinux-552b07b56eba3e7883a69aa0aad80f2c09d87cc1.tar.xz
media: ti-vpe: cal: Use dev_* print macros
Use the dev_* print macros instead of the v4l2_* print macros. This prepares for a common print infrastructure that will also support the cal_camerarx instances. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/ti-vpe/cal.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index ff9bc3ae58ba..4b718b4a79c9 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -53,19 +53,23 @@ static unsigned debug;
module_param(debug, uint, 0644);
MODULE_PARM_DESC(debug, "activates debug info");
-#define cal_dbg(level, cal, fmt, arg...) \
- v4l2_dbg(level, debug, &cal->v4l2_dev, fmt, ##arg)
+#define cal_dbg(level, cal, fmt, arg...) \
+ do { \
+ if (debug >= (level)) \
+ dev_printk(KERN_DEBUG, &(cal)->pdev->dev, \
+ fmt, ##arg); \
+ } while (0)
#define cal_info(cal, fmt, arg...) \
- v4l2_info(&cal->v4l2_dev, fmt, ##arg)
+ dev_info(&(cal)->pdev->dev, fmt, ##arg)
#define cal_err(cal, fmt, arg...) \
- v4l2_err(&cal->v4l2_dev, fmt, ##arg)
+ dev_err(&(cal)->pdev->dev, fmt, ##arg)
#define ctx_dbg(level, ctx, fmt, arg...) \
- v4l2_dbg(level, debug, &ctx->v4l2_dev, fmt, ##arg)
+ cal_dbg(level, (ctx)->cal, "ctx%u: " fmt, (ctx)->csi2_port, ##arg)
#define ctx_info(ctx, fmt, arg...) \
- v4l2_info(&ctx->v4l2_dev, fmt, ##arg)
+ cal_info((ctx)->cal, "ctx%u: " fmt, (ctx)->csi2_port, ##arg)
#define ctx_err(ctx, fmt, arg...) \
- v4l2_err(&ctx->v4l2_dev, fmt, ##arg)
+ cal_err((ctx)->cal, "ctx%u: " fmt, (ctx)->csi2_port, ##arg)
#define CAL_NUM_CONTEXT 2