From 50462eb065e12f45851a9959a90d46b758944552 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 10 Dec 2009 11:47:13 -0200 Subject: V4L/DVB (13555): v4l: Use video_device_node_name() instead of the minor number Instead of using the minor number in kernel log messages, use the device node name as returned by the video_device_node_name() function. This makes debug, informational and error messages easier to understand for end users. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging] Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/cx25821/cx25821-audups11.c | 5 +++-- drivers/staging/cx25821/cx25821-video0.c | 5 +++-- drivers/staging/cx25821/cx25821-video1.c | 5 +++-- drivers/staging/cx25821/cx25821-video2.c | 5 +++-- drivers/staging/cx25821/cx25821-video3.c | 5 +++-- drivers/staging/cx25821/cx25821-video4.c | 5 +++-- drivers/staging/cx25821/cx25821-video5.c | 5 +++-- drivers/staging/cx25821/cx25821-video6.c | 5 +++-- drivers/staging/cx25821/cx25821-video7.c | 5 +++-- drivers/staging/cx25821/cx25821-videoioctl.c | 5 +++-- drivers/staging/cx25821/cx25821-vidups10.c | 5 +++-- drivers/staging/cx25821/cx25821-vidups9.c | 5 +++-- 12 files changed, 36 insertions(+), 24 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/cx25821/cx25821-audups11.c b/drivers/staging/cx25821/cx25821-audups11.c index e1364d1..a2fcbf0 100644 --- a/drivers/staging/cx25821/cx25821-audups11.c +++ b/drivers/staging/cx25821/cx25821-audups11.c @@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video0.c b/drivers/staging/cx25821/cx25821-video0.c index eb0fe81..9a47420 100644 --- a/drivers/staging/cx25821/cx25821-video0.c +++ b/drivers/staging/cx25821/cx25821-video0.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video1.c b/drivers/staging/cx25821/cx25821-video1.c index 96ec238..fc9c118 100644 --- a/drivers/staging/cx25821/cx25821-video1.c +++ b/drivers/staging/cx25821/cx25821-video1.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video2.c b/drivers/staging/cx25821/cx25821-video2.c index e659603..7466829 100644 --- a/drivers/staging/cx25821/cx25821-video2.c +++ b/drivers/staging/cx25821/cx25821-video2.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video3.c b/drivers/staging/cx25821/cx25821-video3.c index 873f0f8..0806e40 100644 --- a/drivers/staging/cx25821/cx25821-video3.c +++ b/drivers/staging/cx25821/cx25821-video3.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video4.c b/drivers/staging/cx25821/cx25821-video4.c index c00e3f8..f44e1d4 100644 --- a/drivers/staging/cx25821/cx25821-video4.c +++ b/drivers/staging/cx25821/cx25821-video4.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video5.c b/drivers/staging/cx25821/cx25821-video5.c index 06396b8..85028ea 100644 --- a/drivers/staging/cx25821/cx25821-video5.c +++ b/drivers/staging/cx25821/cx25821-video5.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video6.c b/drivers/staging/cx25821/cx25821-video6.c index c5410c1..27afa03 100644 --- a/drivers/staging/cx25821/cx25821-video6.c +++ b/drivers/staging/cx25821/cx25821-video6.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-video7.c b/drivers/staging/cx25821/cx25821-video7.c index 274977e..055a7ef 100644 --- a/drivers/staging/cx25821/cx25821-video7.c +++ b/drivers/staging/cx25821/cx25821-video7.c @@ -93,13 +93,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-videoioctl.c b/drivers/staging/cx25821/cx25821-videoioctl.c index 42ea8bf..ae33355 100644 --- a/drivers/staging/cx25821/cx25821-videoioctl.c +++ b/drivers/staging/cx25821/cx25821-videoioctl.c @@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; u32 pix_format; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-vidups10.c b/drivers/staging/cx25821/cx25821-vidups10.c index 4e0033f..97db6cd 100644 --- a/drivers/staging/cx25821/cx25821-vidups10.c +++ b/drivers/staging/cx25821/cx25821-vidups10.c @@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); diff --git a/drivers/staging/cx25821/cx25821-vidups9.c b/drivers/staging/cx25821/cx25821-vidups9.c index 67fc082..d06054f 100644 --- a/drivers/staging/cx25821/cx25821-vidups9.c +++ b/drivers/staging/cx25821/cx25821-vidups9.c @@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = { static int video_open(struct file *file) { - int minor = video_devdata(file)->minor; + struct video_device *vdev = video_devdata(file); struct cx25821_dev *dev = video_drvdata(file); struct cx25821_fh *fh; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - printk("open minor=%d type=%s\n", minor, v4l2_type_names[type]); + printk("open dev=%s type=%s\n", video_device_node_name(vdev), + v4l2_type_names[type]); /* allocate + initialize per filehandle data */ fh = kzalloc(sizeof(*fh), GFP_KERNEL); -- cgit v1.1