]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/gadget/function/f_obex.c
Merge remote-tracking branch 'target-updates/for-next'
[karo-tx-linux.git] / drivers / usb / gadget / function / f_obex.c
index 1c3d30ad2f92cb3edba2ab0eb3ca490378de86f1..d6396e0909eeb45898541094cb2347b4d38bde24 100644 (file)
@@ -387,22 +387,6 @@ static inline struct f_serial_opts *to_f_serial_opts(struct config_item *item)
                            func_inst.group);
 }
 
-CONFIGFS_ATTR_STRUCT(f_serial_opts);
-static ssize_t f_obex_attr_show(struct config_item *item,
-                               struct configfs_attribute *attr,
-                               char *page)
-{
-       struct f_serial_opts *opts = to_f_serial_opts(item);
-       struct f_serial_opts_attribute *f_serial_opts_attr =
-               container_of(attr, struct f_serial_opts_attribute, attr);
-       ssize_t ret = 0;
-
-       if (f_serial_opts_attr->show)
-               ret = f_serial_opts_attr->show(opts, page);
-
-       return ret;
-}
-
 static void obex_attr_release(struct config_item *item)
 {
        struct f_serial_opts *opts = to_f_serial_opts(item);
@@ -412,19 +396,17 @@ static void obex_attr_release(struct config_item *item)
 
 static struct configfs_item_operations obex_item_ops = {
        .release        = obex_attr_release,
-       .show_attribute = f_obex_attr_show,
 };
 
-static ssize_t f_obex_port_num_show(struct f_serial_opts *opts, char *page)
+static ssize_t f_obex_port_num_show(struct config_item *item, char *page)
 {
-       return sprintf(page, "%u\n", opts->port_num);
+       return sprintf(page, "%u\n", to_f_serial_opts(item)->port_num);
 }
 
-static struct f_serial_opts_attribute f_obex_port_num =
-       __CONFIGFS_ATTR_RO(port_num, f_obex_port_num_show);
+CONFIGFS_ATTR_RO(f_obex_, port_num);
 
 static struct configfs_attribute *acm_attrs[] = {
-       &f_obex_port_num.attr,
+       &f_obex_attr_port_num,
        NULL,
 };