diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2009-12-10 08:47:13 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-15 21:17:57 -0500 |
commit | 50462eb065e12f45851a9959a90d46b758944552 (patch) | |
tree | fea5b79f1852183c5eaa3f079d5054dc78a828fa /drivers/media/video/s2255drv.c | |
parent | 63b0d5ad20365edf8baf96cdbb8e7faf62501286 (diff) |
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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s2255drv.c')
-rw-r--r-- | drivers/media/video/s2255drv.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 0a77108ee06f..f6a4929867db 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -1530,7 +1530,6 @@ static int vidioc_s_parm(struct file *file, void *priv, | |||
1530 | } | 1530 | } |
1531 | static int s2255_open(struct file *file) | 1531 | static int s2255_open(struct file *file) |
1532 | { | 1532 | { |
1533 | int minor = video_devdata(file)->minor; | ||
1534 | struct video_device *vdev = video_devdata(file); | 1533 | struct video_device *vdev = video_devdata(file); |
1535 | struct s2255_dev *dev = video_drvdata(file); | 1534 | struct s2255_dev *dev = video_drvdata(file); |
1536 | struct s2255_fh *fh; | 1535 | struct s2255_fh *fh; |
@@ -1538,7 +1537,9 @@ static int s2255_open(struct file *file) | |||
1538 | int i = 0; | 1537 | int i = 0; |
1539 | int cur_channel = -1; | 1538 | int cur_channel = -1; |
1540 | int state; | 1539 | int state; |
1541 | dprintk(1, "s2255: open called (minor=%d)\n", minor); | 1540 | |
1541 | dprintk(1, "s2255: open called (dev=%s)\n", | ||
1542 | video_device_node_name(vdev)); | ||
1542 | 1543 | ||
1543 | lock_kernel(); | 1544 | lock_kernel(); |
1544 | 1545 | ||
@@ -1650,8 +1651,9 @@ static int s2255_open(struct file *file) | |||
1650 | for (i = 0; i < ARRAY_SIZE(s2255_qctrl); i++) | 1651 | for (i = 0; i < ARRAY_SIZE(s2255_qctrl); i++) |
1651 | qctl_regs[i] = s2255_qctrl[i].default_value; | 1652 | qctl_regs[i] = s2255_qctrl[i].default_value; |
1652 | 1653 | ||
1653 | dprintk(1, "s2255drv: open minor=%d type=%s users=%d\n", | 1654 | dprintk(1, "s2255drv: open dev=%s type=%s users=%d\n", |
1654 | minor, v4l2_type_names[type], dev->users[cur_channel]); | 1655 | video_device_node_name(vdev), v4l2_type_names[type], |
1656 | dev->users[cur_channel]); | ||
1655 | dprintk(2, "s2255drv: open: fh=0x%08lx, dev=0x%08lx, vidq=0x%08lx\n", | 1657 | dprintk(2, "s2255drv: open: fh=0x%08lx, dev=0x%08lx, vidq=0x%08lx\n", |
1656 | (unsigned long)fh, (unsigned long)dev, | 1658 | (unsigned long)fh, (unsigned long)dev, |
1657 | (unsigned long)&dev->vidq[cur_channel]); | 1659 | (unsigned long)&dev->vidq[cur_channel]); |
@@ -1728,7 +1730,8 @@ static int s2255_close(struct file *file) | |||
1728 | { | 1730 | { |
1729 | struct s2255_fh *fh = file->private_data; | 1731 | struct s2255_fh *fh = file->private_data; |
1730 | struct s2255_dev *dev = fh->dev; | 1732 | struct s2255_dev *dev = fh->dev; |
1731 | int minor = video_devdata(file)->minor; | 1733 | struct video_device *vdev = video_devdata(file); |
1734 | |||
1732 | if (!dev) | 1735 | if (!dev) |
1733 | return -ENODEV; | 1736 | return -ENODEV; |
1734 | 1737 | ||
@@ -1748,8 +1751,8 @@ static int s2255_close(struct file *file) | |||
1748 | mutex_unlock(&dev->open_lock); | 1751 | mutex_unlock(&dev->open_lock); |
1749 | 1752 | ||
1750 | kref_put(&dev->kref, s2255_destroy); | 1753 | kref_put(&dev->kref, s2255_destroy); |
1751 | dprintk(1, "s2255: close called (minor=%d, users=%d)\n", | 1754 | dprintk(1, "s2255: close called (dev=%s, users=%d)\n", |
1752 | minor, dev->users[fh->channel]); | 1755 | video_device_node_name(vdev), dev->users[fh->channel]); |
1753 | kfree(fh); | 1756 | kfree(fh); |
1754 | return 0; | 1757 | return 0; |
1755 | } | 1758 | } |