Messages in this thread | | | Date | Wed, 3 Oct 2012 08:08:12 -0700 | From | Greg Kroah-Hartman <> | Subject | Re: [PATCH 6/7] usb: core: reuse kbasename() |
| |
On Wed, Oct 03, 2012 at 11:27:27AM +0300, Andy Shevchenko wrote: > On Tue, Oct 2, 2012 at 6:00 PM, Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > --- a/drivers/usb/core/file.c > > +++ b/drivers/usb/core/file.c > > > @@ -200,14 +200,9 @@ int usb_register_dev(struct usb_interface *intf, > > > > /* create a usb class device for this usb interface */ > > snprintf(name, sizeof(name), class_driver->name, minor - minor_base); > > - temp = strrchr(name, '/'); > > - if (temp && (temp[1] != '\0')) > I have checked current linux-next, the drivers define .name in the > usb_class_driver structure as '...%d'. > So, what is the reason to check for trailing '/' here? Historical > reasons or there is a (broken/3rd party/etc) driver with it?
I really do not remember why it was done this way, sorry. I have no problem not doing it anymore, as long as you are willing to fix any potential bugs that might pop up :)
And no, I don't worry about 3rd party drivers, that shouldn't be an issue at all here.
greg k-h
| |