Commit 50462eb0 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 63b0d5ad
...@@ -194,7 +194,6 @@ void saa7146_buffer_timeout(unsigned long data) ...@@ -194,7 +194,6 @@ void saa7146_buffer_timeout(unsigned long data)
static int fops_open(struct file *file) static int fops_open(struct file *file)
{ {
unsigned int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file); struct video_device *vdev = video_devdata(file);
struct saa7146_dev *dev = video_drvdata(file); struct saa7146_dev *dev = video_drvdata(file);
struct saa7146_fh *fh = NULL; struct saa7146_fh *fh = NULL;
...@@ -202,7 +201,7 @@ static int fops_open(struct file *file) ...@@ -202,7 +201,7 @@ static int fops_open(struct file *file)
enum v4l2_buf_type type; enum v4l2_buf_type type;
DEB_EE(("file:%p, minor:%d\n", file, minor)); DEB_EE(("file:%p, dev:%s\n", file, video_device_node_name(vdev)));
if (mutex_lock_interruptible(&saa7146_devices_lock)) if (mutex_lock_interruptible(&saa7146_devices_lock))
return -ERESTARTSYS; return -ERESTARTSYS;
......
...@@ -3207,11 +3207,12 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait) ...@@ -3207,11 +3207,12 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
static int bttv_open(struct file *file) static int bttv_open(struct file *file)
{ {
int minor = video_devdata(file)->minor; int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file);
struct bttv *btv = video_drvdata(file); struct bttv *btv = video_drvdata(file);
struct bttv_fh *fh; struct bttv_fh *fh;
enum v4l2_buf_type type = 0; enum v4l2_buf_type type = 0;
dprintk(KERN_DEBUG "bttv: open minor=%d\n",minor); dprintk(KERN_DEBUG "bttv: open dev=%s\n", video_device_node_name(vdev));
lock_kernel(); lock_kernel();
if (btv->video_dev->minor == minor) { if (btv->video_dev->minor == minor) {
...@@ -3409,10 +3410,11 @@ static struct video_device bttv_video_template = { ...@@ -3409,10 +3410,11 @@ static struct video_device bttv_video_template = {
static int radio_open(struct file *file) static int radio_open(struct file *file)
{ {
int minor = video_devdata(file)->minor; int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file);
struct bttv *btv = video_drvdata(file); struct bttv *btv = video_drvdata(file);
struct bttv_fh *fh; struct bttv_fh *fh;
dprintk("bttv: open minor=%d\n",minor); dprintk("bttv: open dev=%s\n", video_device_node_name(vdev));
lock_kernel(); lock_kernel();
WARN_ON(btv->radio_dev && btv->radio_dev->minor != minor); WARN_ON(btv->radio_dev && btv->radio_dev->minor != minor);
......
...@@ -758,8 +758,8 @@ int cx18_v4l2_open(struct file *filp) ...@@ -758,8 +758,8 @@ int cx18_v4l2_open(struct file *filp)
mutex_lock(&cx->serialize_lock); mutex_lock(&cx->serialize_lock);
if (cx18_init_on_first_open(cx)) { if (cx18_init_on_first_open(cx)) {
CX18_ERR("Failed to initialize on minor %d\n", CX18_ERR("Failed to initialize on %s\n",
video_dev->minor); video_device_node_name(video_dev));
mutex_unlock(&cx->serialize_lock); mutex_unlock(&cx->serialize_lock);
return -ENXIO; return -ENXIO;
} }
......
...@@ -1916,7 +1916,6 @@ static int radio_queryctrl(struct file *file, void *priv, ...@@ -1916,7 +1916,6 @@ static int radio_queryctrl(struct file *file, void *priv,
*/ */
static int cx231xx_v4l2_open(struct file *filp) static int cx231xx_v4l2_open(struct file *filp)
{ {
int minor = video_devdata(filp)->minor;
int errCode = 0, radio = 0; int errCode = 0, radio = 0;
struct video_device *vdev = video_devdata(filp); struct video_device *vdev = video_devdata(filp);
struct cx231xx *dev = video_drvdata(filp); struct cx231xx *dev = video_drvdata(filp);
...@@ -1937,8 +1936,9 @@ static int cx231xx_v4l2_open(struct file *filp) ...@@ -1937,8 +1936,9 @@ static int cx231xx_v4l2_open(struct file *filp)
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
cx231xx_videodbg("open minor=%d type=%s users=%d\n", cx231xx_videodbg("open dev=%s type=%s users=%d\n",
minor, v4l2_type_names[fh_type], dev->users); video_device_node_name(vdev), v4l2_type_names[fh_type],
dev->users);
#if 0 #if 0
errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
......
...@@ -717,7 +717,6 @@ static int get_resource(struct cx23885_fh *fh) ...@@ -717,7 +717,6 @@ static int get_resource(struct cx23885_fh *fh)
static int video_open(struct file *file) static int video_open(struct file *file)
{ {
int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file); struct video_device *vdev = video_devdata(file);
struct cx23885_dev *dev = video_drvdata(file); struct cx23885_dev *dev = video_drvdata(file);
struct cx23885_fh *fh; struct cx23885_fh *fh;
...@@ -736,8 +735,8 @@ static int video_open(struct file *file) ...@@ -736,8 +735,8 @@ static int video_open(struct file *file)
break; break;
} }
dprintk(1, "open minor=%d radio=%d type=%s\n", dprintk(1, "open dev=%s radio=%d type=%s\n",
minor, radio, v4l2_type_names[type]); video_device_node_name(vdev), radio, v4l2_type_names[type]);
/* allocate + initialize per filehandle data */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -1048,7 +1048,7 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id) ...@@ -1048,7 +1048,7 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *id)
static int mpeg_open(struct file *file) static int mpeg_open(struct file *file)
{ {
int minor = video_devdata(file)->minor; struct video_device *vdev = video_devdata(file);
struct cx8802_dev *dev = video_drvdata(file); struct cx8802_dev *dev = video_drvdata(file);
struct cx8802_fh *fh; struct cx8802_fh *fh;
struct cx8802_driver *drv = NULL; struct cx8802_driver *drv = NULL;
...@@ -1075,7 +1075,7 @@ static int mpeg_open(struct file *file) ...@@ -1075,7 +1075,7 @@ static int mpeg_open(struct file *file)
unlock_kernel(); unlock_kernel();
return -EINVAL; return -EINVAL;
} }
dprintk(1,"open minor=%d\n",minor); dprintk(1, "open dev=%s\n", video_device_node_name(vdev));
/* allocate + initialize per filehandle data */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh),GFP_KERNEL); fh = kzalloc(sizeof(*fh),GFP_KERNEL);
......
...@@ -749,7 +749,6 @@ static int get_ressource(struct cx8800_fh *fh) ...@@ -749,7 +749,6 @@ static int get_ressource(struct cx8800_fh *fh)
static int video_open(struct file *file) static int video_open(struct file *file)
{ {
int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file); struct video_device *vdev = video_devdata(file);
struct cx8800_dev *dev = video_drvdata(file); struct cx8800_dev *dev = video_drvdata(file);
struct cx88_core *core; struct cx88_core *core;
...@@ -773,8 +772,8 @@ static int video_open(struct file *file) ...@@ -773,8 +772,8 @@ static int video_open(struct file *file)
core = dev->core; core = dev->core;
dprintk(1,"open minor=%d radio=%d type=%s\n", dprintk(1, "open dev=%s radio=%d type=%s\n",
minor,radio,v4l2_type_names[type]); video_device_node_name(vdev), radio, v4l2_type_names[type]);
/* allocate + initialize per filehandle data */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh),GFP_KERNEL); fh = kzalloc(sizeof(*fh),GFP_KERNEL);
......
...@@ -2081,7 +2081,6 @@ static int radio_queryctrl(struct file *file, void *priv, ...@@ -2081,7 +2081,6 @@ static int radio_queryctrl(struct file *file, void *priv,
*/ */
static int em28xx_v4l2_open(struct file *filp) static int em28xx_v4l2_open(struct file *filp)
{ {
int minor = video_devdata(filp)->minor;
int errCode = 0, radio = 0; int errCode = 0, radio = 0;
struct video_device *vdev = video_devdata(filp); struct video_device *vdev = video_devdata(filp);
struct em28xx *dev = video_drvdata(filp); struct em28xx *dev = video_drvdata(filp);
...@@ -2103,8 +2102,9 @@ static int em28xx_v4l2_open(struct file *filp) ...@@ -2103,8 +2102,9 @@ static int em28xx_v4l2_open(struct file *filp)
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
em28xx_videodbg("open minor=%d type=%s users=%d\n", em28xx_videodbg("open dev=%s type=%s users=%d\n",
minor, v4l2_type_names[fh_type], dev->users); video_device_node_name(vdev), v4l2_type_names[fh_type],
dev->users);
fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL); fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL);
......
...@@ -985,8 +985,8 @@ int ivtv_v4l2_open(struct file *filp) ...@@ -985,8 +985,8 @@ int ivtv_v4l2_open(struct file *filp)
mutex_lock(&itv->serialize_lock); mutex_lock(&itv->serialize_lock);
if (ivtv_init_on_first_open(itv)) { if (ivtv_init_on_first_open(itv)) {
IVTV_ERR("Failed to initialize on minor %d\n", IVTV_ERR("Failed to initialize on device %s\n",
vdev->minor); video_device_node_name(vdev));
mutex_unlock(&itv->serialize_lock); mutex_unlock(&itv->serialize_lock);
return -ENXIO; return -ENXIO;
} }
......
...@@ -5867,8 +5867,8 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -5867,8 +5867,8 @@ ov51x_probe(struct usb_interface *intf, const struct usb_device_id *id)
ov511_devused |= 1 << nr; ov511_devused |= 1 << nr;
ov->nr = nr; ov->nr = nr;
dev_info(&intf->dev, "Device at %s registered to minor %d\n", dev_info(&intf->dev, "Device at %s registered to %s\n",
ov->usb_path, ov->vdev->minor); ov->usb_path, video_device_node_name(ov->vdev));
usb_set_intfdata(intf, ov); usb_set_intfdata(intf, ov);
if (ov_create_sysfs(ov->vdev)) { if (ov_create_sysfs(ov->vdev)) {
......
...@@ -1530,7 +1530,6 @@ static int vidioc_s_parm(struct file *file, void *priv, ...@@ -1530,7 +1530,6 @@ static int vidioc_s_parm(struct file *file, void *priv,
} }
static int s2255_open(struct file *file) static int s2255_open(struct file *file)
{ {
int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file); struct video_device *vdev = video_devdata(file);
struct s2255_dev *dev = video_drvdata(file); struct s2255_dev *dev = video_drvdata(file);
struct s2255_fh *fh; struct s2255_fh *fh;
...@@ -1538,7 +1537,9 @@ static int s2255_open(struct file *file) ...@@ -1538,7 +1537,9 @@ static int s2255_open(struct file *file)
int i = 0; int i = 0;
int cur_channel = -1; int cur_channel = -1;
int state; int state;
dprintk(1, "s2255: open called (minor=%d)\n", minor);
dprintk(1, "s2255: open called (dev=%s)\n",
video_device_node_name(vdev));
lock_kernel(); lock_kernel();
...@@ -1650,8 +1651,9 @@ static int s2255_open(struct file *file) ...@@ -1650,8 +1651,9 @@ static int s2255_open(struct file *file)
for (i = 0; i < ARRAY_SIZE(s2255_qctrl); i++) for (i = 0; i < ARRAY_SIZE(s2255_qctrl); i++)
qctl_regs[i] = s2255_qctrl[i].default_value; qctl_regs[i] = s2255_qctrl[i].default_value;
dprintk(1, "s2255drv: open minor=%d type=%s users=%d\n", dprintk(1, "s2255drv: open dev=%s type=%s users=%d\n",
minor, v4l2_type_names[type], dev->users[cur_channel]); video_device_node_name(vdev), v4l2_type_names[type],
dev->users[cur_channel]);
dprintk(2, "s2255drv: open: fh=0x%08lx, dev=0x%08lx, vidq=0x%08lx\n", dprintk(2, "s2255drv: open: fh=0x%08lx, dev=0x%08lx, vidq=0x%08lx\n",
(unsigned long)fh, (unsigned long)dev, (unsigned long)fh, (unsigned long)dev,
(unsigned long)&dev->vidq[cur_channel]); (unsigned long)&dev->vidq[cur_channel]);
...@@ -1728,7 +1730,8 @@ static int s2255_close(struct file *file) ...@@ -1728,7 +1730,8 @@ static int s2255_close(struct file *file)
{ {
struct s2255_fh *fh = file->private_data; struct s2255_fh *fh = file->private_data;
struct s2255_dev *dev = fh->dev; struct s2255_dev *dev = fh->dev;
int minor = video_devdata(file)->minor; struct video_device *vdev = video_devdata(file);
if (!dev) if (!dev)
return -ENODEV; return -ENODEV;
...@@ -1748,8 +1751,8 @@ static int s2255_close(struct file *file) ...@@ -1748,8 +1751,8 @@ static int s2255_close(struct file *file)
mutex_unlock(&dev->open_lock); mutex_unlock(&dev->open_lock);
kref_put(&dev->kref, s2255_destroy); kref_put(&dev->kref, s2255_destroy);
dprintk(1, "s2255: close called (minor=%d, users=%d)\n", dprintk(1, "s2255: close called (dev=%s, users=%d)\n",
minor, dev->users[fh->channel]); video_device_node_name(vdev), dev->users[fh->channel]);
kfree(fh); kfree(fh);
return 0; return 0;
} }
......
...@@ -86,11 +86,11 @@ static int ts_init_encoder(struct saa7134_dev* dev) ...@@ -86,11 +86,11 @@ static int ts_init_encoder(struct saa7134_dev* dev)
static int ts_open(struct file *file) static int ts_open(struct file *file)
{ {
int minor = video_devdata(file)->minor; struct video_device *vdev = video_devdata(file);
struct saa7134_dev *dev = video_drvdata(file); struct saa7134_dev *dev = video_drvdata(file);
int err; int err;
dprintk("open minor=%d\n",minor); dprintk("open dev=%s\n", video_device_node_name(vdev));
err = -EBUSY; err = -EBUSY;
if (!mutex_trylock(&dev->empress_tsq.vb_lock)) if (!mutex_trylock(&dev->empress_tsq.vb_lock))
goto done; goto done;
......
...@@ -1326,7 +1326,6 @@ static int saa7134_resource(struct saa7134_fh *fh) ...@@ -1326,7 +1326,6 @@ static int saa7134_resource(struct saa7134_fh *fh)
static int video_open(struct file *file) static int video_open(struct file *file)
{ {
int minor = video_devdata(file)->minor;
struct video_device *vdev = video_devdata(file); struct video_device *vdev = video_devdata(file);
struct saa7134_dev *dev = video_drvdata(file); struct saa7134_dev *dev = video_drvdata(file);
struct saa7134_fh *fh; struct saa7134_fh *fh;
...@@ -1345,8 +1344,8 @@ static int video_open(struct file *file) ...@@ -1345,8 +1344,8 @@ static int video_open(struct file *file)
break; break;
} }
dprintk("open minor=%d radio=%d type=%s\n",minor,radio, dprintk("open dev=%s radio=%d type=%s\n", video_device_node_name(vdev),
v4l2_type_names[type]); radio, v4l2_type_names[type]);
/* allocate + initialize per filehandle data */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh),GFP_KERNEL); fh = kzalloc(sizeof(*fh),GFP_KERNEL);
......
...@@ -1222,8 +1222,7 @@ static int vivi_close(struct file *file) ...@@ -1222,8 +1222,7 @@ static int vivi_close(struct file *file)
struct vivi_fh *fh = file->private_data; struct vivi_fh *fh = file->private_data;
struct vivi_dev *dev = fh->dev; struct vivi_dev *dev = fh->dev;
struct vivi_dmaqueue *vidq = &dev->vidq; struct vivi_dmaqueue *vidq = &dev->vidq;
struct video_device *vdev = video_devdata(file);
int minor = video_devdata(file)->minor;
vivi_stop_thread(vidq); vivi_stop_thread(vidq);
videobuf_stop(&fh->vb_vidq); videobuf_stop(&fh->vb_vidq);
...@@ -1235,8 +1234,8 @@ static int vivi_close(struct file *file) ...@@ -1235,8 +1234,8 @@ static int vivi_close(struct file *file)
dev->users--; dev->users--;
mutex_unlock(&dev->mutex); mutex_unlock(&dev->mutex);
dprintk(dev, 1, "close called (minor=%d, users=%d)\n", dprintk(dev, 1, "close called (dev=%s, users=%d)\n",
minor, dev->users); video_device_node_name(vdev), dev->users);
return 0; return 0;
} }
......
...@@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -93,13 +93,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -93,13 +93,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,13 +94,14 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
u32 pix_format; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
...@@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = { ...@@ -94,12 +94,13 @@ static struct videobuf_queue_ops cx25821_video_qops = {
static int video_open(struct file *file) 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_dev *dev = video_drvdata(file);
struct cx25821_fh *fh; struct cx25821_fh *fh;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 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 */ /* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL); fh = kzalloc(sizeof(*fh), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment