aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/tm6000/tm6000-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:43:18 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:43:18 -0300
commit0a34df5359ea153bf6f756c0c9db2ca2bc002cf4 (patch)
treeb3349b00a227704ea0c1316e423ae01e48569673 /drivers/staging/tm6000/tm6000-video.c
parent1eefd763fb482e5a325c68b6889c699de4b7dc16 (diff)
V4L/DVB (13555a): 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: apply just the tm6000 changes on a separate patch] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000/tm6000-video.c')
-rw-r--r--drivers/staging/tm6000/tm6000-video.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index fc5a9089ab6..d853f82f443 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -1311,18 +1311,18 @@ static int vidioc_s_frequency (struct file *file, void *priv,
static int tm6000_open(struct file *file)
{
- int minor = video_devdata(file)->minor;
- struct tm6000_core *h,*dev = NULL;
+ struct video_device *vdev = video_devdata(file);
+ struct tm6000_core *dev = video_drvdata(file);
struct tm6000_fh *fh;
struct list_head *list;
enum v4l2_buf_type type = 0;
int i,rc;
- printk(KERN_INFO "tm6000: open called (minor=%d)\n",minor);
+ printk(KERN_INFO "tm6000: open called (dev=%s)\n",
+ video_device_node_name(vdev));
-
- dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: open called "
- "(minor=%d)\n",minor);
+ dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: open called (dev=%s)\n",
+ video_device_node_name(vdev));
list_for_each(list,&tm6000_corelist) {
h = list_entry(list, struct tm6000_core, tm6000_corelist);
@@ -1338,8 +1338,9 @@ static int tm6000_open(struct file *file)
/* If more than one user, mutex should be added */
dev->users++;
- dprintk(dev, V4L2_DEBUG_OPEN, "open minor=%d type=%s users=%d\n",
- minor,v4l2_type_names[type],dev->users);
+ dprintk(dev, V4L2_DEBUG_OPEN, "open dev=%s type=%s users=%d\n",
+ video_device_node_name(vdev), v4l2_type_names[type],
+ dev->users);
/* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh),GFP_KERNEL);
@@ -1436,9 +1437,10 @@ static int tm6000_release(struct file *file)
{
struct tm6000_fh *fh = file->private_data;
struct tm6000_core *dev = fh->dev;
- int minor = video_devdata(file)->minor;
+ struct video_device *vdev = video_devdata(file);
- dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: close called (minor=%d, users=%d)\n",minor,dev->users);
+ dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: close called (dev=%s, users=%d)\n",
+ video_device_node_name(vdev), dev->users);
dev->users--;