On Monday 19 January 2009, Mauro Carvalho Chehab wrote: > On Sun, 18 Jan 2009 21:49:13 +0100 > > Laurent Pinchart <laurent.pinchart@xxxxxxxxx> wrote: > > Mauro, > > > > Please pull from http://linuxtv.org/hg/~pinchartl/uvcvideo/ > > > > for the following 3 changesets: > > > > uvcvideo: replace strn{cpy,cat} with strl{cpy,cat}. > > Hmm... instead of this: > > + phys = kasprintf(GFP_KERNEL, "usb-%s-%s", udev->bus->bus_name, > + udev->devpath); > > You should use, instead: > > usb_make_path(udev, phys, sizeof(phys)); > > This is easier to read and it should become a standard to fill bus_name on > usb drivers, since it produces a canonical name. input->name isn't a fixed-size buffer but a dynamically allocated one, so I can't use usb_make_path as-is. Reading the code, the phys buffer is currently leaked, so I'll have to fix it anyway. Switching to a fixed-size buffer is possible and 64 bytes seems to be a sensible value. Most USB input devices seem to set phys to usb_make_path() + "/input0". Is there an authoritative source of information regarding how the phys field should be formatted ? Cheers, Laurent Pinchart -- 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