__video_register_device: warning cannot be reached if warn_if_nr_in_use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In file drivers/media/video/v4l2-dev.c

int __video_register_device(struct video_device *vdev, int type, int nr,
		int warn_if_nr_in_use, struct module *owner)
{
[...]
	vdev->minor = i + minor_offset;
878:	vdev->num = nr;

vdev->num is set to nr here. 
[...]
	if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
		printk(KERN_WARNING "%s: requested %s%d, got %s\n", __func__,
			name_base, nr, video_device_node_name(vdev));

so nr != vdev->num is always false. The warning can never be printed.

Thanks
Richard

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux