git: 216ca4cee118 - main - nvdimm_e820: Use driver->name in identify method.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 06 May 2022 21:44:12 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=216ca4cee1189ce1dd38b293c9dd431eb5ff8b02

commit 216ca4cee1189ce1dd38b293c9dd431eb5ff8b02
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-05-06 21:42:02 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-06 21:42:02 +0000

    nvdimm_e820: Use driver->name in identify method.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D35077
---
 sys/dev/nvdimm/nvdimm_e820.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/dev/nvdimm/nvdimm_e820.c b/sys/dev/nvdimm/nvdimm_e820.c
index 97f825004ed0..35ca8c60d1d0 100644
--- a/sys/dev/nvdimm/nvdimm_e820.c
+++ b/sys/dev/nvdimm/nvdimm_e820.c
@@ -257,15 +257,15 @@ nvdimm_e820_remove_spas(device_t dev)
 }
 
 static void
-nvdimm_e820_identify(driver_t *driver __unused, device_t parent)
+nvdimm_e820_identify(driver_t *driver, device_t parent)
 {
 	device_t child;
 	caddr_t kmdp;
 
-	if (resource_disabled(NVDIMM_E820, 0))
+	if (resource_disabled(driver->name, 0))
 		return;
 	/* Just create a single instance of the fake bus. */
-	if (device_find_child(parent, NVDIMM_E820, -1) != NULL)
+	if (device_find_child(parent, driver->name, -1) != NULL)
 		return;
 
 	kmdp = preload_search_by_type("elf kernel");
@@ -278,9 +278,9 @@ nvdimm_e820_identify(driver_t *driver __unused, device_t parent)
 	if (smapbase == NULL)
 		return;
 
-	child = BUS_ADD_CHILD(parent, 0, NVDIMM_E820, -1);
+	child = BUS_ADD_CHILD(parent, 0, driver->name, -1);
 	if (child == NULL)
-		device_printf(parent, "add %s child failed\n", NVDIMM_E820);
+		device_printf(parent, "add %s child failed\n", driver->name);
 }
 
 static int