X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fconfig.c;h=33c51714f49c0c7bbe0129536506bd9b4de8415a;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=ae7ec74052fb6b73793fe3fa3d40f06547045ea7;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index ae7ec7405..33c51714f 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -106,7 +106,7 @@ skip_to_next_endpoint_or_interface_descriptor: return buffer - buffer0 + i; } -static void usb_release_interface_cache(struct kref *ref) +void usb_release_interface_cache(struct kref *ref) { struct usb_interface_cache *intfc = ref_to_usb_interface_cache(ref); int j; @@ -356,7 +356,7 @@ int usb_parse_configuration(struct device *ddev, int cfgidx, if (!intfc) return -ENOMEM; memset(intfc, 0, len); - kref_init(&intfc->ref, usb_release_interface_cache); + kref_init(&intfc->ref); } /* Skip over any Class Specific or Vendor Specific descriptors; @@ -422,7 +422,8 @@ void usb_destroy_configuration(struct usb_device *dev) for (i = 0; i < cf->desc.bNumInterfaces; i++) { if (cf->intf_cache[i]) - kref_put(&cf->intf_cache[i]->ref); + kref_put(&cf->intf_cache[i]->ref, + usb_release_interface_cache); } } kfree(dev->config);