summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-06-22 09:38:06 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-06 20:26:46 (GMT)
commit4a085168b59ec0fb18eb7fa023dcc47f4db14655 (patch)
tree7714bce24858460f6cb6ca03254752d3adc28360 /drivers/media
parent80131fe06e0bdd7b429594493c1317ddede89a61 (diff)
downloadlinux-4a085168b59ec0fb18eb7fa023dcc47f4db14655.tar.xz
[media] v4l2-ioctl: remove v4l_(i2c_)print_ioctl
v4l_i2c_print_ioctl wasn't used and v4l_print_ioctl could be replaced by v4l_printk_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c4
-rw-r--r--drivers/media/video/sn9c102/sn9c102.h2
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c2
-rw-r--r--drivers/media/video/v4l2-ioctl.c34
4 files changed, 12 insertions, 30 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index cbe4080..f344aed 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -957,7 +957,7 @@ static long pvr2_v4l2_ioctl(struct file *file,
long ret = -EINVAL;
if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL)
- v4l_print_ioctl(pvr2_hdw_get_driver_name(hdw), cmd);
+ v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw), cmd);
if (!pvr2_hdw_dev_ok(hdw)) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
@@ -990,7 +990,7 @@ static long pvr2_v4l2_ioctl(struct file *file,
pvr2_trace(PVR2_TRACE_V4LIOCTL,
"pvr2_v4l2_do_ioctl failure, ret=%ld"
" command was:", ret);
- v4l_print_ioctl(pvr2_hdw_get_driver_name(hdw),
+ v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw),
cmd);
}
}
diff --git a/drivers/media/video/sn9c102/sn9c102.h b/drivers/media/video/sn9c102/sn9c102.h
index 22ea211..2bc153e 100644
--- a/drivers/media/video/sn9c102/sn9c102.h
+++ b/drivers/media/video/sn9c102/sn9c102.h
@@ -182,7 +182,7 @@ do { \
# define V4LDBG(level, name, cmd) \
do { \
if (debug >= (level)) \
- v4l_print_ioctl(name, cmd); \
+ v4l_printk_ioctl(name, cmd); \
} while (0)
# define KDBG(level, fmt, args...) \
do { \
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index 759bef8..f00db30 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -1051,7 +1051,7 @@ static long uvc_v4l2_ioctl(struct file *file,
{
if (uvc_trace_param & UVC_TRACE_IOCTL) {
uvc_printk(KERN_DEBUG, "uvc_v4l2_ioctl(");
- v4l_printk_ioctl(cmd);
+ v4l_printk_ioctl(NULL, cmd);
printk(")\n");
}
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 273c6d7..fd6436e 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -28,27 +28,6 @@
#include <media/v4l2-device.h>
#include <media/v4l2-chip-ident.h>
-#define dbgarg(cmd, fmt, arg...) \
- do { \
- if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { \
- printk(KERN_DEBUG "%s: ", vfd->name); \
- v4l_printk_ioctl(cmd); \
- printk(" " fmt, ## arg); \
- } \
- } while (0)
-
-#define dbgarg2(fmt, arg...) \
- do { \
- if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \
- printk(KERN_DEBUG "%s: " fmt, vfd->name, ## arg);\
- } while (0)
-
-#define dbgarg3(fmt, arg...) \
- do { \
- if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \
- printk(KERN_CONT "%s: " fmt, vfd->name, ## arg);\
- } while (0)
-
/* Zero out the end of the struct pointed to by p. Everything after, but
* not including, the specified field is cleared. */
#define CLEAR_AFTER_FIELD(p, field) \
@@ -1956,10 +1935,13 @@ bool v4l2_is_known_ioctl(unsigned int cmd)
/* Common ioctl debug function. This function can be used by
external ioctl messages as well as internal V4L ioctl */
-void v4l_printk_ioctl(unsigned int cmd)
+void v4l_printk_ioctl(const char *prefix, unsigned int cmd)
{
const char *dir, *type;
+ if (prefix)
+ printk(KERN_DEBUG "%s: ", prefix);
+
switch (_IOC_TYPE(cmd)) {
case 'd':
type = "v4l2_int";
@@ -2003,8 +1985,8 @@ static long __video_do_ioctl(struct file *file,
long ret = -ENOTTY;
if (ops == NULL) {
- printk(KERN_WARNING "videodev: \"%s\" has no ioctl_ops.\n",
- vfd->name);
+ pr_warn("%s: has no ioctl_ops.\n",
+ video_device_node_name(vfd));
return ret;
}
@@ -2034,7 +2016,7 @@ static long __video_do_ioctl(struct file *file,
write_only = _IOC_DIR(cmd) == _IOC_WRITE;
if (write_only && debug > V4L2_DEBUG_IOCTL) {
- v4l_print_ioctl(vfd->name, cmd);
+ v4l_printk_ioctl(video_device_node_name(vfd), cmd);
pr_cont(": ");
info->debug(arg, write_only);
}
@@ -2062,7 +2044,7 @@ done:
video_device_node_name(vfd), ret);
return ret;
}
- v4l_print_ioctl(vfd->name, cmd);
+ v4l_printk_ioctl(video_device_node_name(vfd), cmd);
if (ret < 0)
pr_cont(": error %ld\n", ret);
else if (debug == V4L2_DEBUG_IOCTL)