diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2014-06-18 08:24:48 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-19 11:06:48 -0400 |
commit | fe00b138295650fc46670b68342029b9fc391c62 (patch) | |
tree | 508a7e1f2e77060ed4c208fd35f2181663103026 | |
parent | f0688c8b81d2ea239c3fb0b848f623b579238d99 (diff) |
usb: gadget: OS descriptors configfs cleanup
A number of variables serve a generic purpose of handling
"compatible id" and "subcompatible id", but the names suggest they
are for rndis only. Rename to reflect variables' purpose.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/configfs.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 2ddcd635ca2a..fadd6be26834 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c | |||
@@ -1145,15 +1145,15 @@ static struct configfs_item_operations interf_item_ops = { | |||
1145 | .store_attribute = usb_os_desc_attr_store, | 1145 | .store_attribute = usb_os_desc_attr_store, |
1146 | }; | 1146 | }; |
1147 | 1147 | ||
1148 | static ssize_t rndis_grp_compatible_id_show(struct usb_os_desc *desc, | 1148 | static ssize_t interf_grp_compatible_id_show(struct usb_os_desc *desc, |
1149 | char *page) | 1149 | char *page) |
1150 | { | 1150 | { |
1151 | memcpy(page, desc->ext_compat_id, 8); | 1151 | memcpy(page, desc->ext_compat_id, 8); |
1152 | return 8; | 1152 | return 8; |
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | static ssize_t rndis_grp_compatible_id_store(struct usb_os_desc *desc, | 1155 | static ssize_t interf_grp_compatible_id_store(struct usb_os_desc *desc, |
1156 | const char *page, size_t len) | 1156 | const char *page, size_t len) |
1157 | { | 1157 | { |
1158 | int l; | 1158 | int l; |
1159 | 1159 | ||
@@ -1171,20 +1171,20 @@ static ssize_t rndis_grp_compatible_id_store(struct usb_os_desc *desc, | |||
1171 | return len; | 1171 | return len; |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | static struct usb_os_desc_attribute rndis_grp_attr_compatible_id = | 1174 | static struct usb_os_desc_attribute interf_grp_attr_compatible_id = |
1175 | __CONFIGFS_ATTR(compatible_id, S_IRUGO | S_IWUSR, | 1175 | __CONFIGFS_ATTR(compatible_id, S_IRUGO | S_IWUSR, |
1176 | rndis_grp_compatible_id_show, | 1176 | interf_grp_compatible_id_show, |
1177 | rndis_grp_compatible_id_store); | 1177 | interf_grp_compatible_id_store); |
1178 | 1178 | ||
1179 | static ssize_t rndis_grp_sub_compatible_id_show(struct usb_os_desc *desc, | 1179 | static ssize_t interf_grp_sub_compatible_id_show(struct usb_os_desc *desc, |
1180 | char *page) | 1180 | char *page) |
1181 | { | 1181 | { |
1182 | memcpy(page, desc->ext_compat_id + 8, 8); | 1182 | memcpy(page, desc->ext_compat_id + 8, 8); |
1183 | return 8; | 1183 | return 8; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | static ssize_t rndis_grp_sub_compatible_id_store(struct usb_os_desc *desc, | 1186 | static ssize_t interf_grp_sub_compatible_id_store(struct usb_os_desc *desc, |
1187 | const char *page, size_t len) | 1187 | const char *page, size_t len) |
1188 | { | 1188 | { |
1189 | int l; | 1189 | int l; |
1190 | 1190 | ||
@@ -1202,14 +1202,14 @@ static ssize_t rndis_grp_sub_compatible_id_store(struct usb_os_desc *desc, | |||
1202 | return len; | 1202 | return len; |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | static struct usb_os_desc_attribute rndis_grp_attr_sub_compatible_id = | 1205 | static struct usb_os_desc_attribute interf_grp_attr_sub_compatible_id = |
1206 | __CONFIGFS_ATTR(sub_compatible_id, S_IRUGO | S_IWUSR, | 1206 | __CONFIGFS_ATTR(sub_compatible_id, S_IRUGO | S_IWUSR, |
1207 | rndis_grp_sub_compatible_id_show, | 1207 | interf_grp_sub_compatible_id_show, |
1208 | rndis_grp_sub_compatible_id_store); | 1208 | interf_grp_sub_compatible_id_store); |
1209 | 1209 | ||
1210 | static struct configfs_attribute *interf_grp_attrs[] = { | 1210 | static struct configfs_attribute *interf_grp_attrs[] = { |
1211 | &rndis_grp_attr_compatible_id.attr, | 1211 | &interf_grp_attr_compatible_id.attr, |
1212 | &rndis_grp_attr_sub_compatible_id.attr, | 1212 | &interf_grp_attr_sub_compatible_id.attr, |
1213 | NULL | 1213 | NULL |
1214 | }; | 1214 | }; |
1215 | 1215 | ||