]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/gadget/function/f_phonet.c
Merge remote-tracking branch 'target-updates/for-next'
[karo-tx-linux.git] / drivers / usb / gadget / function / f_phonet.c
index 62a198754029e1f707147a12713f758a186cdd8e..157441dbfeba861d4d877f8009dca6fb44acd740 100644 (file)
@@ -583,21 +583,6 @@ static inline struct f_phonet_opts *to_f_phonet_opts(struct config_item *item)
                        func_inst.group);
 }
 
-CONFIGFS_ATTR_STRUCT(f_phonet_opts);
-static ssize_t f_phonet_attr_show(struct config_item *item,
-                               struct configfs_attribute *attr,
-                               char *page)
-{
-       struct f_phonet_opts *opts = to_f_phonet_opts(item);
-       struct f_phonet_opts_attribute *f_phonet_opts_attr =
-               container_of(attr, struct f_phonet_opts_attribute, attr);
-       ssize_t ret = 0;
-
-       if (f_phonet_opts_attr->show)
-               ret = f_phonet_opts_attr->show(opts, page);
-       return ret;
-}
-
 static void phonet_attr_release(struct config_item *item)
 {
        struct f_phonet_opts *opts = to_f_phonet_opts(item);
@@ -607,19 +592,17 @@ static void phonet_attr_release(struct config_item *item)
 
 static struct configfs_item_operations phonet_item_ops = {
        .release                = phonet_attr_release,
-       .show_attribute         = f_phonet_attr_show,
 };
 
-static ssize_t f_phonet_ifname_show(struct f_phonet_opts *opts, char *page)
+static ssize_t f_phonet_ifname_show(struct config_item *item, char *page)
 {
-       return gether_get_ifname(opts->net, page, PAGE_SIZE);
+       return gether_get_ifname(to_f_phonet_opts(item)->net, page, PAGE_SIZE);
 }
 
-static struct f_phonet_opts_attribute f_phonet_ifname =
-       __CONFIGFS_ATTR_RO(ifname, f_phonet_ifname_show);
+CONFIGFS_ATTR_RO(f_phonet_, ifname);
 
 static struct configfs_attribute *phonet_attrs[] = {
-       &f_phonet_ifname.attr,
+       &f_phonet_attr_ifname,
        NULL,
 };