summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-04-19 15:20:28 +0200
committerAngel Pons <th3fanbus@gmail.com>2021-04-23 10:13:39 +0000
commite76f15f4fdf2d2094b351a6a1a95dec1c63d017c (patch)
tree36d512dd783fd494bcd225250db102ca849020dc /src/drivers
parent3aa757d7056bf7f231da12ca211cba4b2f6c68be (diff)
src: Replace remaining {get,set}_option() instances
With this change, the type-unsafe {get,set}_option() API functions are no longer used directly. The old API gets dropped in a follow-up. Change-Id: Id3f3e172c850d50a7d2f348b1c3736969c73837d Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52512 Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c4
-rw-r--r--src/drivers/lenovo/hybrid_graphics/romstage.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c b/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c
index 8f0e7bd4b3..bae8a54c58 100644
--- a/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c
+++ b/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c
@@ -14,7 +14,7 @@
static void lenovo_hybrid_graphics_enable(struct device *dev)
{
const struct drivers_lenovo_hybrid_graphics_config *config;
- enum hybrid_graphics_req mode = HYBRID_GRAPHICS_DEFAULT_GPU;
+ enum hybrid_graphics_req mode;
/* Don't confuse anyone else and disable the fake device */
dev->enabled = 0;
@@ -25,7 +25,7 @@ static void lenovo_hybrid_graphics_enable(struct device *dev)
return;
}
- get_option(&mode, "hybrid_graphics_mode");
+ mode = get_int_option("hybrid_graphics_mode", HYBRID_GRAPHICS_DEFAULT_GPU);
if (mode == HYBRID_GRAPHICS_DISCRETE) {
printk(BIOS_DEBUG, "Hybrid graphics:"
diff --git a/src/drivers/lenovo/hybrid_graphics/romstage.c b/src/drivers/lenovo/hybrid_graphics/romstage.c
index 3d14646479..747c9b73ae 100644
--- a/src/drivers/lenovo/hybrid_graphics/romstage.c
+++ b/src/drivers/lenovo/hybrid_graphics/romstage.c
@@ -18,7 +18,7 @@ void early_hybrid_graphics(bool *enable_igd, bool *enable_peg)
{
const struct drivers_lenovo_hybrid_graphics_config *config;
const struct device *dev;
- enum hybrid_graphics_req mode = HYBRID_GRAPHICS_DEFAULT_GPU;
+ enum hybrid_graphics_req mode;
/* TODO: Use generic device instead of dummy PNP device */
dev = dev_find_slot_pnp(HYBRID_GRAPHICS_PORT, HYBRID_GRAPHICS_DEVICE);
@@ -39,7 +39,7 @@ void early_hybrid_graphics(bool *enable_igd, bool *enable_peg)
return;
}
- get_option(&mode, "hybrid_graphics_mode");
+ mode = get_int_option("hybrid_graphics_mode", HYBRID_GRAPHICS_DEFAULT_GPU);
if (mode == HYBRID_GRAPHICS_DISCRETE) {
printk(BIOS_DEBUG, "Hybrid graphics:"