diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2022-09-20 16:07:27 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2022-10-17 08:41:54 +0000 |
commit | 69474c060d7c19c7df9f8ec07cf5b04e5b355190 (patch) | |
tree | 773c6c4e9e0c3bf0562c1d1ac37bc54a0f236b67 /sys/arm | |
parent | 85194e20d047bdefd835478452c6f318f4875c08 (diff) | |
download | src-69474c060d7c19c7df9f8ec07cf5b04e5b355190.tar.gz src-69474c060d7c19c7df9f8ec07cf5b04e5b355190.zip |
Use DEFINE_CLASS_0 in the arm generic timer
Rather than defining the structure manually use the DEFINE_CLASS_0
macro. As we have both an ACPI and FDT attachment we need to use the
_0 variant of the macro as DEFINE_CLASS would create two structures
with the same name.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 42353d81e3a580442a70404a4fcfcbc16c36ef3f)
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/generic_timer.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index e465d1afbb3d..3f5f65439ddc 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -507,11 +507,8 @@ static device_method_t arm_tmr_fdt_methods[] = { { 0, 0 } }; -static driver_t arm_tmr_fdt_driver = { - "generic_timer", - arm_tmr_fdt_methods, - sizeof(struct arm_tmr_softc), -}; +static DEFINE_CLASS_0(generic_timer, arm_tmr_fdt_driver, arm_tmr_fdt_methods, + sizeof(struct arm_tmr_softc)); static devclass_t arm_tmr_fdt_devclass; @@ -529,11 +526,8 @@ static device_method_t arm_tmr_acpi_methods[] = { { 0, 0 } }; -static driver_t arm_tmr_acpi_driver = { - "generic_timer", - arm_tmr_acpi_methods, - sizeof(struct arm_tmr_softc), -}; +static DEFINE_CLASS_0(generic_timer, arm_tmr_acpi_driver, arm_tmr_acpi_methods, + sizeof(struct arm_tmr_softc)); static devclass_t arm_tmr_acpi_devclass; |