Commit bbea6de1 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi

usb: gadget: f_uvc: rename a macro to avoid conflicts

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: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 6b1b0fe0
...@@ -605,7 +605,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -605,7 +605,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
INFO(cdev, "uvc_function_bind\n"); 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. /* Sanity check the streaming endpoint module parameters.
*/ */
opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U);
...@@ -766,7 +766,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -766,7 +766,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
static void uvc_free_inst(struct usb_function_instance *f) 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); kfree(opts);
} }
...@@ -818,7 +818,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi) ...@@ -818,7 +818,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
uvc->state = UVC_STATE_DISCONNECTED; 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.fs_control = opts->fs_control;
uvc->desc.ss_control = opts->ss_control; uvc->desc.ss_control = opts->ss_control;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/usb/composite.h> #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 f_uvc_opts {
struct usb_function_instance func_inst; struct usb_function_instance func_inst;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment