]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: gadget: f_uvc: rename a macro to avoid conflicts
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Wed, 10 Dec 2014 11:34:00 +0000 (12:34 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Jan 2015 18:13:26 +0000 (12:13 -0600)
When configfs is integrated, CONFIGFS_ATTR_STRUCT and CONFIGFS_ATTR_OPS
macros should be used, but the latter expects that tere is a to_f_uvc_opts
function accepting a config_item, whereas the macro being changed
can be applied to a different type of argument.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_uvc.c
drivers/usb/gadget/function/u_uvc.h

index 945b3bd2ca98a4847c30ce7e462a691f944051b2..5b4ab39cce44c8701bad9c8ac02116dedb5d25c1 100644 (file)
@@ -605,7 +605,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
 
        INFO(cdev, "uvc_function_bind\n");
 
-       opts = to_f_uvc_opts(f->fi);
+       opts = fi_to_f_uvc_opts(f->fi);
        /* Sanity check the streaming endpoint module parameters.
         */
        opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U);
@@ -766,7 +766,7 @@ error:
 
 static void uvc_free_inst(struct usb_function_instance *f)
 {
-       struct f_uvc_opts *opts = to_f_uvc_opts(f);
+       struct f_uvc_opts *opts = fi_to_f_uvc_opts(f);
 
        kfree(opts);
 }
@@ -818,7 +818,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
                return ERR_PTR(-ENOMEM);
 
        uvc->state = UVC_STATE_DISCONNECTED;
-       opts = to_f_uvc_opts(fi);
+       opts = fi_to_f_uvc_opts(fi);
 
        uvc->desc.fs_control = opts->fs_control;
        uvc->desc.ss_control = opts->ss_control;
index 2a8dfdff033257bae119e6f2bb50a44d737a1074..c0706a3d701932fd87dcf395922000bd184fe176 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <linux/usb/composite.h>
 
-#define to_f_uvc_opts(f)       container_of(f, struct f_uvc_opts, func_inst)
+#define fi_to_f_uvc_opts(f)    container_of(f, struct f_uvc_opts, func_inst)
 
 struct f_uvc_opts {
        struct usb_function_instance                    func_inst;