File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ static int hwmon_pmu__read_events(struct hwmon_pmu *pmu)
274274 int number ;
275275 enum hwmon_item item ;
276276 bool alarm ;
277- union hwmon_pmu_event_key key = {};
277+ union hwmon_pmu_event_key key = { . type_and_num = 0 };
278278 struct hwmon_pmu_event_value * value ;
279279
280280 if (ent -> d_type != DT_REG )
@@ -560,7 +560,7 @@ bool hwmon_pmu__have_event(struct perf_pmu *pmu, const char *name)
560560 struct hwmon_pmu * hwm = container_of (pmu , struct hwmon_pmu , pmu );
561561 enum hwmon_type type ;
562562 int number ;
563- union hwmon_pmu_event_key key = {};
563+ union hwmon_pmu_event_key key = { . type_and_num = 0 };
564564 struct hashmap_entry * cur ;
565565 size_t bkt ;
566566
@@ -623,10 +623,11 @@ static int hwmon_pmu__config_term(const struct hwmon_pmu *hwm,
623623 return - EINVAL ;
624624 } else {
625625 union hwmon_pmu_event_key key = {
626- .type = type ,
627- .num = number ,
626+ .type_and_num = 0 ,
628627 };
629628
629+ key .type = type ;
630+ key .num = number ;
630631 attr -> config = key .type_and_num ;
631632 }
632633 return 0 ;
You can’t perform that action at this time.
0 commit comments