W dniu 07.12.2014 o 23:27, Laurent Pinchart pisze:
Hi Andrzej,

Thank you for the patch. I think we're nearly there :-)


Please see inline

<snip>


@@ -787,25 +789,104 @@ static void uvc_free_inst(struct
usb_function_instance *f)

[snip]

  static void uvc_free(struct usb_function *f)
  {
        struct uvc_device *uvc = to_uvc(f);
-
+       struct f_uvc_opts *opts = container_of(f->fi, struct f_uvc_opts,
+                                              func_inst);
+       --opts->refcnt;

Ok, now refcnt is modified, but it's never tested :-)


It is.

Short answer: Please look into uvc_configfs.c.

Longer answer:
The idea is that refcnt is nonzero whenever a function
is linked to a configuration. If that is the case, the
contents of the function (directory) should not be modified.
opts->refcnt value is checked in uvc_configfs.c.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to