git: 1fb5445206a5 - main - acpi: Use bus_generic_alloc_resource instead of duplicating it

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 09 Feb 2024 18:44:24 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=1fb5445206a5ef2351c32f8bc6beb67605593caa

commit 1fb5445206a5ef2351c32f8bc6beb67605593caa
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-02-09 18:27:45 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-02-09 18:27:45 +0000

    acpi: Use bus_generic_alloc_resource instead of duplicating it
    
    No functional change, but it is cleaner to use the existing generic
    wrappers rather than KOBJ methods directly.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D43686
---
 sys/dev/acpica/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index b2a337b3487d..2899929c8e6b 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1533,7 +1533,7 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid,
 	    }
 	}
     } else
-	res = BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, rid,
+	res = bus_generic_alloc_resource(bus, child, type, rid,
 	    start, end, count, flags);
 
     /*