SMBIOS: Skip `get_smbios_data` for disabled devices
If a device is disabled, do not call the `get_smbios_data` code. Change-Id: I8960f869e0864f7c82d5fe507f96b62cbd045569 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57458 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
6a73b2466f
commit
8b98f8bf07
|
@ -1229,7 +1229,10 @@ static int smbios_walk_device_tree(struct device *tree, int *handle, unsigned lo
|
|||
int len = 0;
|
||||
|
||||
for (dev = tree; dev; dev = dev->next) {
|
||||
if (dev->enabled && dev->ops && dev->ops->get_smbios_data) {
|
||||
if (!dev->enabled)
|
||||
continue;
|
||||
|
||||
if (dev->ops && dev->ops->get_smbios_data) {
|
||||
printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), dev_name(dev));
|
||||
len += dev->ops->get_smbios_data(dev, handle, current);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue