summaryrefslogtreecommitdiff
path: root/util/inteltool/inteltool.c
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2014-11-05 21:27:01 +0100
committerMathias Krause <minipli@googlemail.com>2014-11-06 06:45:48 +0100
commit5ad6ec55f84076982c3342d4c7695aa918ac663b (patch)
treed1d3bb3d1d97ded6aef7cd875b77e9377b4f8723 /util/inteltool/inteltool.c
parent0cc8f29316f6930406d70f71fc9409e295516b1e (diff)
downloadcoreboot-5ad6ec55f84076982c3342d4c7695aa918ac663b.tar.xz
inteltool: Fix message in case of multiple LPC controllers
If we find multiple LPC controllers, we want to tell the user that we'll ignore all but the first. However, we use 'dev' in the message (the current device found) instead of 'sb' (the one we want to use). Fix the message by using 'sb' and break the loop right away in this case. It's sufficient to tell the user once which LPC controller we'll use. Change-Id: Ibd27e40525fabe8c63b112691ad49fd994c70a48 Signed-off-by: Mathias Krause <minipli@googlemail.com> Reviewed-on: http://review.coreboot.org/7342 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r--util/inteltool/inteltool.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c
index 79f0f3c361..2d785477bb 100644
--- a/util/inteltool/inteltool.c
+++ b/util/inteltool/inteltool.c
@@ -339,13 +339,14 @@ int main(int argc, char *argv[])
pci_fill_info(dev, PCI_FILL_CLASS);
/* The ISA/LPC bridge can be 0x1f, 0x07, or 0x04 so we probe. */
if (dev->device_class == 0x0601) { /* ISA/LPC bridge */
- if (sb == NULL)
+ if (sb == NULL) {
sb = dev;
- else
+ } else {
fprintf(stderr, "Multiple devices with class ID"
" 0x0601, using %02x%02x:%02x.%02x\n",
- dev->domain, dev->bus, dev->dev,
- dev->func);
+ sb->domain, sb->bus, sb->dev, sb->func);
+ break;
+ }
}
}