git: e6464fce46f2 - stable/13 - nvdimm_e820: Use driver->name in identify method.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 May 2022 00:21:06 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e6464fce46f27a53c467420938b55231bb7f50ee commit e6464fce46f27a53c467420938b55231bb7f50ee Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-05-06 21:42:02 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-05-19 22:01:50 +0000 nvdimm_e820: Use driver->name in identify method. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D35077 (cherry picked from commit 216ca4cee1189ce1dd38b293c9dd431eb5ff8b02) --- 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 66bdff937dc5..0ba8cfbc7868 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