Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38c7c036 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (13550): v4l: Use the new video_device_node_name function



Fix all device drivers to use the new video_device_node_name function.

This also strips kernel log messages from the "/dev/" prefix, has the device
node location is a userspace policy decision unknown to the kernel.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent eac8ea53
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -543,15 +543,13 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
		return err;
	}

	if( VFL_TYPE_GRABBER == type ) {
	if (VFL_TYPE_GRABBER == type)
		vv->video_minor = vfd->minor;
		INFO(("%s: registered device video%d [v4l2]\n",
			dev->name, vfd->num));
	} else {
	else
		vv->vbi_minor = vfd->minor;
		INFO(("%s: registered device vbi%d [v4l2]\n",
			dev->name, vfd->num));
	}

	INFO(("%s: registered device %s [v4l2]\n",
		dev->name, video_device_node_name(vfd)));

	*vid = vfd;
	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -860,8 +860,8 @@ static int __init ar_init(void)
		goto out_dev;
	}

	printk("video%d: Found M64278 VGA (IRQ %d, Freq %dMHz).\n",
		ar->vdev->num, M32R_IRQ_INT3, freq);
	printk("%s: Found M64278 VGA (IRQ %d, Freq %dMHz).\n",
		video_device_node_name(ar->vdev), M32R_IRQ_INT3, freq);

	return 0;

+6 −6
Original line number Diff line number Diff line
@@ -4244,8 +4244,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
	if (video_register_device(btv->video_dev, VFL_TYPE_GRABBER,
				  video_nr[btv->c.nr]) < 0)
		goto err;
	printk(KERN_INFO "bttv%d: registered device video%d\n",
	       btv->c.nr, btv->video_dev->num);
	printk(KERN_INFO "bttv%d: registered device %s\n",
	       btv->c.nr, video_device_node_name(btv->video_dev));
	if (device_create_file(&btv->video_dev->dev,
				     &dev_attr_card)<0) {
		printk(KERN_ERR "bttv%d: device_create_file 'card' "
@@ -4261,8 +4261,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
	if (video_register_device(btv->vbi_dev, VFL_TYPE_VBI,
				  vbi_nr[btv->c.nr]) < 0)
		goto err;
	printk(KERN_INFO "bttv%d: registered device vbi%d\n",
	       btv->c.nr, btv->vbi_dev->num);
	printk(KERN_INFO "bttv%d: registered device %s\n",
	       btv->c.nr, video_device_node_name(btv->vbi_dev));

	if (!btv->has_radio)
		return 0;
@@ -4273,8 +4273,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
	if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,
				  radio_nr[btv->c.nr]) < 0)
		goto err;
	printk(KERN_INFO "bttv%d: registered device radio%d\n",
	       btv->c.nr, btv->radio_dev->num);
	printk(KERN_INFO "bttv%d: registered device %s\n",
	       btv->c.nr, video_device_node_name(btv->radio_dev));

	/* all done */
	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -809,8 +809,8 @@ static int init_cqcam(struct parport *port)
		return -ENODEV;
	}

	printk(KERN_INFO "video%d: Colour QuickCam found on %s\n",
	       qcam->vdev.num, qcam->pport->name);
	printk(KERN_INFO "%s: Colour QuickCam found on %s\n",
	       video_device_node_name(&qcam->vdev), qcam->pport->name);

	qcams[num_cams++] = qcam;

+4 −9
Original line number Diff line number Diff line
@@ -1342,15 +1342,13 @@ static int cpia_write_proc(struct file *file, const char __user *buf,

static void create_proc_cpia_cam(struct cam_data *cam)
{
	char name[5 + 1 + 10 + 1];
	struct proc_dir_entry *ent;

	if (!cpia_proc_root || !cam)
		return;

	snprintf(name, sizeof(name), "video%d", cam->vdev.num);

	ent = create_proc_entry(name, S_IFREG|S_IRUGO|S_IWUSR, cpia_proc_root);
	ent = create_proc_entry(video_device_node_name(&cam->vdev),
				S_IFREG|S_IRUGO|S_IWUSR, cpia_proc_root);
	if (!ent)
		return;

@@ -1368,13 +1366,10 @@ static void create_proc_cpia_cam(struct cam_data *cam)

static void destroy_proc_cpia_cam(struct cam_data *cam)
{
	char name[5 + 1 + 10 + 1];

	if (!cam || !cam->proc_entry)
		return;

	snprintf(name, sizeof(name), "video%d", cam->vdev.num);
	remove_proc_entry(name, cpia_proc_root);
	remove_proc_entry(video_device_node_name(&cam->vdev), cpia_proc_root);
	cam->proc_entry = NULL;
}

@@ -3999,7 +3994,7 @@ void cpia_unregister_camera(struct cam_data *cam)
	}

#ifdef CONFIG_PROC_FS
	DBG("destroying /proc/cpia/video%d\n", cam->vdev.num);
	DBG("destroying /proc/cpia/%s\n", video_device_node_name(&cam->vdev));
	destroy_proc_cpia_cam(cam);
#endif
	if (!cam->open_count) {
Loading