aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Cowan <ian@linux.cowan.aero>2022-05-06 06:28:00 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-06-20 10:30:29 +0100
commitf3805c32ddd18ed494e8ab300fca7de208577682 (patch)
treea75365881f98069c21a008a648b1387ade1582b1
parentmedia: atmel: atmel-sama7g5-isc: fix warning in configs without OF (diff)
downloadlinux-dev-f3805c32ddd18ed494e8ab300fca7de208577682.tar.xz
linux-dev-f3805c32ddd18ed494e8ab300fca7de208577682.zip
media: staging: media: zoran: add logging macros
This adds the zrdev_dbg() (pointing to pci_dbg()), zrdev_err() (pointing to pci_err()), and zrdev_info() (pointing to pci_info()) macros to the zoran drivers. These are the preferred method for debugging and this will allow to extract the device from the zoran struct to make the call. Signed-off-by: Ian Cowan <ian@linux.cowan.aero> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/staging/media/zoran/zoran.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/media/zoran/zoran.h b/drivers/staging/media/zoran/zoran.h
index 654c95fa5aba..33ee10211543 100644
--- a/drivers/staging/media/zoran/zoran.h
+++ b/drivers/staging/media/zoran/zoran.h
@@ -19,6 +19,7 @@
#define _BUZ_H_
#include <linux/debugfs.h>
+#include <linux/pci.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/videobuf2-core.h>
@@ -301,6 +302,18 @@ static inline struct zoran *to_zoran(struct v4l2_device *v4l2_dev)
#endif
+/*
+ * Debugging macros
+ */
+#define zrdev_dbg(zr, format, args...) \
+ pci_dbg((zr)->pci_dev, format, ##args) \
+
+#define zrdev_err(zr, format, args...) \
+ pci_err((zr)->pci_dev, format, ##args) \
+
+#define zrdev_info(zr, format, args...) \
+ pci_info((zr)->pci_dev, format, ##args) \
+
int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir);
void zoran_queue_exit(struct zoran *zr);
int zr_set_buf(struct zoran *zr);