Skip to content

Commit 4a0192c

Browse files
djrscallygregkh
authored andcommitted
usb: gadget: usb: Remove "default" from color matching attributes
Color matching attributes in the configfs for UVC are named with the phrase "default". The implication of that is that they will only be used _with_ the default color matching descriptor, and that will shortly no longer be the case. Remove the "default" from the color matching descriptor attribute variables. Signed-off-by: Daniel Scally <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 263b628 commit 4a0192c

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

drivers/usb/gadget/function/uvc_configfs.c

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,8 +1783,8 @@ static const struct uvcg_config_group_type uvcg_mjpeg_grp_type = {
17831783
* streaming/color_matching/default
17841784
*/
17851785

1786-
#define UVCG_DEFAULT_COLOR_MATCHING_ATTR(cname, aname, bits) \
1787-
static ssize_t uvcg_default_color_matching_##cname##_show( \
1786+
#define UVCG_COLOR_MATCHING_ATTR(cname, aname, bits) \
1787+
static ssize_t uvcg_color_matching_##cname##_show( \
17881788
struct config_item *item, char *page) \
17891789
{ \
17901790
struct config_group *group = to_config_group(item); \
@@ -1808,26 +1808,25 @@ static ssize_t uvcg_default_color_matching_##cname##_show( \
18081808
return result; \
18091809
} \
18101810
\
1811-
UVC_ATTR_RO(uvcg_default_color_matching_, cname, aname)
1811+
UVC_ATTR_RO(uvcg_color_matching_, cname, aname)
18121812

1813-
UVCG_DEFAULT_COLOR_MATCHING_ATTR(b_color_primaries, bColorPrimaries, 8);
1814-
UVCG_DEFAULT_COLOR_MATCHING_ATTR(b_transfer_characteristics,
1815-
bTransferCharacteristics, 8);
1816-
UVCG_DEFAULT_COLOR_MATCHING_ATTR(b_matrix_coefficients, bMatrixCoefficients, 8);
1813+
UVCG_COLOR_MATCHING_ATTR(b_color_primaries, bColorPrimaries, 8);
1814+
UVCG_COLOR_MATCHING_ATTR(b_transfer_characteristics, bTransferCharacteristics, 8);
1815+
UVCG_COLOR_MATCHING_ATTR(b_matrix_coefficients, bMatrixCoefficients, 8);
18171816

1818-
#undef UVCG_DEFAULT_COLOR_MATCHING_ATTR
1817+
#undef UVCG_COLOR_MATCHING_ATTR
18191818

1820-
static struct configfs_attribute *uvcg_default_color_matching_attrs[] = {
1821-
&uvcg_default_color_matching_attr_b_color_primaries,
1822-
&uvcg_default_color_matching_attr_b_transfer_characteristics,
1823-
&uvcg_default_color_matching_attr_b_matrix_coefficients,
1819+
static struct configfs_attribute *uvcg_color_matching_attrs[] = {
1820+
&uvcg_color_matching_attr_b_color_primaries,
1821+
&uvcg_color_matching_attr_b_transfer_characteristics,
1822+
&uvcg_color_matching_attr_b_matrix_coefficients,
18241823
NULL,
18251824
};
18261825

1827-
static const struct uvcg_config_group_type uvcg_default_color_matching_type = {
1826+
static const struct uvcg_config_group_type uvcg_color_matching_type = {
18281827
.type = {
18291828
.ct_item_ops = &uvcg_config_item_ops,
1830-
.ct_attrs = uvcg_default_color_matching_attrs,
1829+
.ct_attrs = uvcg_color_matching_attrs,
18311830
.ct_owner = THIS_MODULE,
18321831
},
18331832
.name = "default",
@@ -1844,7 +1843,7 @@ static const struct uvcg_config_group_type uvcg_color_matching_grp_type = {
18441843
},
18451844
.name = "color_matching",
18461845
.children = (const struct uvcg_config_group_type*[]) {
1847-
&uvcg_default_color_matching_type,
1846+
&uvcg_color_matching_type,
18481847
NULL,
18491848
},
18501849
};

0 commit comments

Comments
 (0)