summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorNaresh G Solanki <naresh.solanki@intel.com>2018-06-05 18:58:53 +0530
committerPatrick Georgi <pgeorgi@google.com>2018-06-07 06:38:07 +0000
commit20c893e82c0cc4e9a44da048fdd5ba75ad9f547c (patch)
tree2867ece5da43eb020171758d42a8c7d4fc96ac4c /src/arch
parent64af41d3db0098149f8d60f92f05488d00c3f6d3 (diff)
arch/x86/smbios: Conditionally call SMBIOS ops
Check whether device is enabled before calling smbios ops. BUG=None BRANCH=None TEST=Build & boot Soraka. Change-Id: I79681c10679e1de3a2d177503f29239968d0c157 Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com> Reviewed-on: https://review.coreboot.org/26864 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/smbios.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 25a41b53aa..da1b711535 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -675,10 +675,11 @@ static int smbios_walk_device_tree(struct device *tree, int *handle,
int len = 0;
for (dev = tree; dev; dev = dev->next) {
- printk(BIOS_INFO, "%s (%s)\n", dev_path(dev), dev_name(dev));
-
- if (dev->ops && dev->ops->get_smbios_data)
+ if (dev->enabled && 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);
+ }
}
return len;
}