summaryrefslogtreecommitdiff
path: root/src/mainboard/kontron/ktqm77
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-11-02 22:49:51 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-04-21 09:06:30 +0000
commitf8a5eb2e4afc190214ba5f1766998a1812f69a40 (patch)
treeaa8b375900a20bd721ceb113fe335110e47684de /src/mainboard/kontron/ktqm77
parent0b7813fe97121eb7cb9c0b8ac59e604e9f613679 (diff)
mainboard: Use read_int_option()
Change-Id: I9273b90b6a21b8f52fa42d9ff03a9b56eec9fcbf Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47137 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/kontron/ktqm77')
-rw-r--r--src/mainboard/kontron/ktqm77/mainboard.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mainboard/kontron/ktqm77/mainboard.c b/src/mainboard/kontron/ktqm77/mainboard.c
index 95e639adcd..2d5063a694 100644
--- a/src/mainboard/kontron/ktqm77/mainboard.c
+++ b/src/mainboard/kontron/ktqm77/mainboard.c
@@ -149,17 +149,16 @@ static void mainboard_enable(struct device *dev)
/* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler);
#endif
-
- unsigned int disable = 0;
- if ((get_option(&disable, "ethernet1") == CB_SUCCESS) && disable) {
+ unsigned int disable = get_int_option("ethernet1", 0);
+ if (disable) {
struct device *nic = pcidev_on_root(0x1c, 2);
if (nic) {
printk(BIOS_DEBUG, "DISABLE FIRST NIC!\n");
nic->enabled = 0;
}
}
- disable = 0;
- if ((get_option(&disable, "ethernet2") == CB_SUCCESS) && disable) {
+ disable = get_int_option("ethernet2", 0);
+ if (disable) {
struct device *nic = pcidev_on_root(0x1c, 3);
if (nic) {
printk(BIOS_DEBUG, "DISABLE SECOND NIC!\n");