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)
274
274
int number ;
275
275
enum hwmon_item item ;
276
276
bool alarm ;
277
- union hwmon_pmu_event_key key = {};
277
+ union hwmon_pmu_event_key key = { . type_and_num = 0 };
278
278
struct hwmon_pmu_event_value * value ;
279
279
280
280
if (ent -> d_type != DT_REG )
@@ -560,7 +560,7 @@ bool hwmon_pmu__have_event(struct perf_pmu *pmu, const char *name)
560
560
struct hwmon_pmu * hwm = container_of (pmu , struct hwmon_pmu , pmu );
561
561
enum hwmon_type type ;
562
562
int number ;
563
- union hwmon_pmu_event_key key = {};
563
+ union hwmon_pmu_event_key key = { . type_and_num = 0 };
564
564
struct hashmap_entry * cur ;
565
565
size_t bkt ;
566
566
@@ -623,10 +623,11 @@ static int hwmon_pmu__config_term(const struct hwmon_pmu *hwm,
623
623
return - EINVAL ;
624
624
} else {
625
625
union hwmon_pmu_event_key key = {
626
- .type = type ,
627
- .num = number ,
626
+ .type_and_num = 0 ,
628
627
};
629
628
629
+ key .type = type ;
630
+ key .num = number ;
630
631
attr -> config = key .type_and_num ;
631
632
}
632
633
return 0 ;
You can’t perform that action at this time.
0 commit comments