diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2015-10-29 10:32:24 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2015-12-26 14:50:36 +0100 |
commit | f7d5437e1c378ca8356528a3f7e5a6706463f5f7 (patch) | |
tree | 09363c5ef4518afa1d53e218673f317d0b367ad1 /drivers | |
parent | a3a31f501cc20c04b8ca654069c641ae8f2fc360 (diff) |
mxc_v4l2_capture.c: make error messages unique
"ERROR: v4l2 capture: slave not found!"
is used for many ioctl. Add the ioctl to the string to ease debugging.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/mxc/capture/mxc_v4l2_capture.c | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c index 9d6ae3e818ae..d00b7eb8c17f 100644 --- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c +++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c @@ -48,6 +48,13 @@ #include "mxc_v4l2_capture.h" #include "ipu_prp_sw.h" +#if 0 +#undef dev_dbg +#define dev_dbg(dev, format, arg...) {dev_printk(KERN_ERR, dev, format, ##arg);} +#undef pr_debug +#define pr_debug(fmt, ...) printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) +#endif + #define init_MUTEX(sem) sema_init(sem, 1) static struct platform_device_id imx_v4l2_devtype[] = { @@ -1006,7 +1013,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->bright = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_BRIGHTNESS\n"); status = -ENODEV; } break; @@ -1016,7 +1023,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->hue = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_HUE\n"); status = -ENODEV; } break; @@ -1026,7 +1033,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->contrast = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_CONTRAST\n"); status = -ENODEV; } break; @@ -1036,7 +1043,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->saturation = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_SATURATION\n"); status = -ENODEV; } break; @@ -1046,7 +1053,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->red = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_RED_BALANCE\n"); status = -ENODEV; } break; @@ -1056,7 +1063,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->blue = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_BLUE_BALANCE\n"); status = -ENODEV; } break; @@ -1066,7 +1073,7 @@ static int mxc_v4l2_g_ctrl(cam_data *cam, struct v4l2_control *c) status = vidioc_int_g_ctrl(cam->sensor, c); cam->ae_mode = c->value; } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_BLACK_LEVEL\n"); status = -ENODEV; } break; @@ -1176,7 +1183,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->hue = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_HUE\n"); ret = -ENODEV; } break; @@ -1185,7 +1192,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->contrast = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_CONTRAST\n"); ret = -ENODEV; } break; @@ -1194,7 +1201,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->bright = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_BRIGHTNESS\n"); ret = -ENODEV; } break; @@ -1203,7 +1210,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->saturation = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_SATURATION\n"); ret = -ENODEV; } break; @@ -1212,7 +1219,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->red = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_RED_BALANCE\n"); ret = -ENODEV; } break; @@ -1221,7 +1228,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->blue = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_BLUE_BALANCE\n"); ret = -ENODEV; } break; @@ -1230,7 +1237,7 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c) cam->ae_mode = c->value; ret = vidioc_int_s_ctrl(cam->sensor, c); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_EXPOSURE\n"); ret = -ENODEV; } break; @@ -1631,7 +1638,7 @@ static int mxc_v4l_open(struct file *file) if (cam->sensor == NULL || cam->sensor->type != v4l2_int_type_slave) { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! V4L2_CID_HUE\n"); return -EAGAIN; } @@ -2303,7 +2310,7 @@ static long mxc_v4l_do_ioctl(struct file *file, if (cam->sensor) retval = vidioc_int_g_parm(cam->sensor, parm); else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_G_PARM\n"); retval = -ENODEV; } break; @@ -2315,7 +2322,7 @@ static long mxc_v4l_do_ioctl(struct file *file, if (cam->sensor) retval = mxc_v4l2_s_param(cam, parm); else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_S_PARM\n"); retval = -ENODEV; } break; @@ -2339,7 +2346,7 @@ static long mxc_v4l_do_ioctl(struct file *file, if (cam->sensor) retval = mxc_v4l2_g_std(cam, e); else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_G_STD\n"); retval = -ENODEV; } break; @@ -2444,7 +2451,7 @@ static long mxc_v4l_do_ioctl(struct file *file, if (cam->sensor) retval = vidioc_int_enum_fmt_cap(cam->sensor, f); else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_ENUM_FMT\n"); retval = -ENODEV; } break; @@ -2454,7 +2461,7 @@ static long mxc_v4l_do_ioctl(struct file *file, if (cam->sensor) retval = vidioc_int_enum_framesizes(cam->sensor, fsize); else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_ENUM_FRAMESIZES\n"); retval = -ENODEV; } break; @@ -2465,7 +2472,7 @@ static long mxc_v4l_do_ioctl(struct file *file, retval = vidioc_int_enum_frameintervals(cam->sensor, fival); } else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_ENUM_FRAMEINTERVALS\n"); retval = -ENODEV; } break; @@ -2477,7 +2484,7 @@ static long mxc_v4l_do_ioctl(struct file *file, if (cam->sensor) retval = vidioc_int_g_chip_ident(cam->sensor, (int *)p); else { - pr_err("ERROR: v4l2 capture: slave not found!\n"); + pr_err("ERROR: v4l2 capture: slave not found! VIDIOC_DBG_G_CHIP_IDENT\n"); retval = -ENODEV; } break; |