aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Clark <[email protected]>2024-01-29 15:40:40 +0000
committerSuzuki K Poulose <[email protected]>2024-02-12 10:21:38 +0000
commit812265e26ed3ac76d3a131709d8755bafcf31b58 (patch)
treea08055ece3fba76e57340ed1a52cdd6e81698482
parent053ad9ad1d13f253605d7644de3aa20d958569ef (diff)
coresight: Add explicit member initializers to coresight_dev_type
These could potentially become wrong silently if the enum is changed, so explicitly initialize them. Signed-off-by: James Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Suzuki K Poulose <[email protected]>
-rw-r--r--drivers/hwtracing/coresight/coresight-sysfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwtracing/coresight/coresight-sysfs.c b/drivers/hwtracing/coresight/coresight-sysfs.c
index 5992f2c2200a..fa52297c73d2 100644
--- a/drivers/hwtracing/coresight/coresight-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-sysfs.c
@@ -378,22 +378,22 @@ static struct attribute *coresight_source_attrs[] = {
ATTRIBUTE_GROUPS(coresight_source);
struct device_type coresight_dev_type[] = {
- {
+ [CORESIGHT_DEV_TYPE_SINK] = {
.name = "sink",
.groups = coresight_sink_groups,
},
- {
+ [CORESIGHT_DEV_TYPE_LINK] = {
.name = "link",
},
- {
+ [CORESIGHT_DEV_TYPE_LINKSINK] = {
.name = "linksink",
.groups = coresight_sink_groups,
},
- {
+ [CORESIGHT_DEV_TYPE_SOURCE] = {
.name = "source",
.groups = coresight_source_groups,
},
- {
+ [CORESIGHT_DEV_TYPE_HELPER] = {
.name = "helper",
}
};