On Wed, Mar 31, 2004 at 06:05:32PM +0200, Olaf Hering wrote: > diff -purNX /kernel_exclude.txt linux-2.6.5-rc3-olh-usb.orig/drivers/usb/core/usb.c > linux-2.6.5-rc3-olh-usb/drivers/usb/core/usb.c > --- linux-2.6.5-rc3-olh-usb.orig/drivers/usb/core/usb.c 2004-03-31 > 11:17:44.000000000 +0000 > +++ linux-2.6.5-rc3-olh-usb/drivers/usb/core/usb.c 2004-03-31 15:30:00.000000000 > +0000 > @@ -992,6 +992,12 @@ void usb_disconnect(struct usb_device ** > clear_bit(dev->devnum, dev->bus->devmap.devicemap); > usbfs_remove_device(dev); > } > + if (dev->static_vendor) > + kfree(dev->static_vendor); > + if (dev->static_product) > + kfree(dev->static_product); > + if (dev->static_serial) > + kfree(dev->static_serial);
Just kfree them, don't check. > /* > * By the time we get here, we chose a new device address > * and is in the default state. We need to identify the thing and > @@ -1155,14 +1175,12 @@ int usb_new_device(struct usb_device *de > dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", > dev->descriptor.iManufacturer, dev->descriptor.iProduct, > dev->descriptor.iSerialNumber); > > -#ifdef DEBUG > if (dev->descriptor.iProduct) > - usb_show_string(dev, "Product", dev->descriptor.iProduct); > + usb_add_static_info(dev, "Product", dev->descriptor.iProduct, > &dev->static_vendor); > if (dev->descriptor.iManufacturer) > - usb_show_string(dev, "Manufacturer", dev->descriptor.iManufacturer); > + usb_add_static_info(dev, "Manufacturer", > dev->descriptor.iManufacturer, &dev->static_product); > if (dev->descriptor.iSerialNumber) > - usb_show_string(dev, "SerialNumber", dev->descriptor.iSerialNumber); > -#endif > + usb_add_static_info(dev, "SerialNumber", > dev->descriptor.iSerialNumber, &dev->static_serial); You aren't dumping this info out to the syslog if DEBUG is enabled. Other than that, it looks sane. Let us know if there are any problems reported with it. thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel