The patch number 11081 was added via Devin Heitmueller <dheitmuel...@linuxtv.org> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: Linux Media Mailing List <linux-me...@vger.kernel.org> ------ From: Devin Heitmueller <dheitmuel...@linuxtv.org> au0828: make sure v4l2_device name is unique Make sure newly created v4l2 devices have a unique name, modeling the logic after the cx18 driver. Thanks to Andy Walls <awa...@radix.net> for pointing out the issue. Priority: normal Signed-off-by: Devin Heitmueller <dheitmuel...@linuxtv.org> --- linux/drivers/media/video/au0828/au0828-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff -r 1407c726d1f2 -r 5fb3bcde6de6 linux/drivers/media/video/au0828/au0828-core.c --- a/linux/drivers/media/video/au0828/au0828-core.c Wed Mar 11 02:01:04 2009 -0400 +++ b/linux/drivers/media/video/au0828/au0828-core.c Wed Mar 11 20:58:04 2009 -0400 @@ -36,6 +36,8 @@ int au0828_debug; int au0828_debug; module_param_named(debug, au0828_debug, int, 0644); MODULE_PARM_DESC(debug, "enable debug messages"); + +static atomic_t au0828_instance = ATOMIC_INIT(0); #define _AU0828_BULKPIPE 0x03 #define _BULKPIPESIZE 0xffff @@ -168,7 +170,7 @@ static int au0828_usb_probe(struct usb_i static int au0828_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) { - int ifnum, retval; + int ifnum, retval, i; struct au0828_dev *dev; struct usb_device *usbdev = interface_to_usbdev(interface); @@ -196,8 +198,9 @@ static int au0828_usb_probe(struct usb_i usb_set_intfdata(interface, dev); /* Create the v4l2_device */ + i = atomic_inc_return(&au0828_instance) - 1; snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s-%03d", - "au0828", 0); + "au0828", i); retval = v4l2_device_register(&dev->usbdev->dev, &dev->v4l2_dev); if (retval) { printk(KERN_ERR "%s() v4l2_device_register failed\n", --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/5fb3bcde6de634802a4955e05b773e69f2d932ec _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits