summaryrefslogtreecommitdiff
path: root/src/ec/lenovo/pmh7/pmh7.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-11-02 20:59:32 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-04-21 09:01:02 +0000
commit9dc1c51db47f43190c9396e9dd77f051530265a4 (patch)
treed37785def28e56bc72a4a4e4d2778fc40023a9a5 /src/ec/lenovo/pmh7/pmh7.c
parentf79030c6ba066d904c0ef6ddcc2483ed60ff7731 (diff)
ec/lenovo: Use get_int_option()
Change-Id: Ie5cb54b171244be71848a59a788ed8d42b3e3161 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47111 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/ec/lenovo/pmh7/pmh7.c')
-rw-r--r--src/ec/lenovo/pmh7/pmh7.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c
index de07a7b0f6..f32c9f18d9 100644
--- a/src/ec/lenovo/pmh7/pmh7.c
+++ b/src/ec/lenovo/pmh7/pmh7.c
@@ -106,7 +106,6 @@ static void enable_dev(struct device *dev)
{
const struct ec_lenovo_pmh7_config *conf = dev->chip_info;
struct resource *resource;
- u8 val;
resource = new_resource(dev, EC_LENOVO_PMH7_INDEX);
resource->flags = IORESOURCE_IO | IORESOURCE_FIXED;
@@ -118,13 +117,9 @@ static void enable_dev(struct device *dev)
pmh7_backlight_enable(conf->backlight_enable);
pmh7_dock_event_enable(conf->dock_event_enable);
- if (get_option(&val, "touchpad") != CB_SUCCESS)
- val = 1;
- pmh7_touchpad_enable(val);
+ pmh7_touchpad_enable(get_int_option("touchpad", 1));
- if (get_option(&val, "trackpoint") != CB_SUCCESS)
- val = 1;
- pmh7_trackpoint_enable(val);
+ pmh7_trackpoint_enable(get_int_option("trackpoint", 1));
printk(BIOS_INFO, "PMH7: ID %02x Revision %02x\n",
pmh7_register_read(EC_LENOVO_PMH7_REG_ID),