diff options
author | 2021-02-23 04:44:30 +0000 | |
---|---|---|
committer | 2021-02-23 04:44:30 +0000 | |
commit | 8611d3cdb295683ad47c33036b86b471b2d09741 (patch) | |
tree | d0827d3cbd218a6f696bdc22475fe41c531de26a /sys/dev/acpi/acpitimer.c | |
parent | filter MAC Bridge component Reserved address (diff) | |
download | wireguard-openbsd-8611d3cdb295683ad47c33036b86b471b2d09741.tar.xz wireguard-openbsd-8611d3cdb295683ad47c33036b86b471b2d09741.zip |
timecounting: use C99-style initialization for all timecounter structs
The timecounter struct is large and I think it may change in the
future. Changing it later will be easier if we use C99-style
initialization for all timecounter structs. It also makes reading the
code a bit easier.
For reasons I cannot explain, switching to C99-style initialization
sometimes changes the hash of the resulting object file, even though
the resulting struct should be the same. So there is a binary change
here, but only sometimes. No behavior should change in either case.
I can't compile-test this everywhere but I have been staring at the
diff for days now and I'm relatively confident this will not break
compilation. Fingers crossed.
ok gnezdo@
Diffstat (limited to 'sys/dev/acpi/acpitimer.c')
-rw-r--r-- | sys/dev/acpi/acpitimer.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/acpi/acpitimer.c b/sys/dev/acpi/acpitimer.c index 8885ab43a71..36623636862 100644 --- a/sys/dev/acpi/acpitimer.c +++ b/sys/dev/acpi/acpitimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpitimer.c,v 1.13 2020/07/06 13:33:08 pirofti Exp $ */ +/* $OpenBSD: acpitimer.c,v 1.14 2021/02/23 04:44:31 cheloha Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -31,14 +31,14 @@ void acpitimerattach(struct device *, struct device *, void *); u_int acpi_get_timecount(struct timecounter *tc); static struct timecounter acpi_timecounter = { - acpi_get_timecount, /* get_timecount */ - 0, /* no poll_pps */ - 0x00ffffff, /* counter_mask (24 bits) */ - ACPI_FREQUENCY, /* frequency */ - 0, /* name */ - 1000, /* quality */ - NULL, /* private bits */ - 0, /* expose to user */ + .tc_get_timecount = acpi_get_timecount, + .tc_poll_pps = 0, + .tc_counter_mask = 0x00ffffff, /* 24 bits */ + .tc_frequency = ACPI_FREQUENCY, + .tc_name = 0, + .tc_quality = 1000, + .tc_priv = NULL, + .tc_user = 0, }; struct acpitimer_softc { |