diff options
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 | } |