usb-gadget/ether: use per-attribute show and store methods

To simplify the configfs interface and remove boilerplate code that also
causes binary bloat.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Christoph Hellwig
2015-10-03 15:32:42 +02:00
committed by Nicholas Bellinger
parent ea6bd6b14e
commit f9a63da33d
6 changed files with 38 additions and 46 deletions

View File

@@ -1503,10 +1503,10 @@ USB_ETHERNET_CONFIGFS_ITEM_ATTR_QMULT(ncm);
USB_ETHERNET_CONFIGFS_ITEM_ATTR_IFNAME(ncm);
static struct configfs_attribute *ncm_attrs[] = {
&f_ncm_opts_dev_addr.attr,
&f_ncm_opts_host_addr.attr,
&f_ncm_opts_qmult.attr,
&f_ncm_opts_ifname.attr,
&ncm_opts_attr_dev_addr,
&ncm_opts_attr_host_addr,
&ncm_opts_attr_qmult,
&ncm_opts_attr_ifname,
NULL,
};