From: Haojian Zhuang Date: Mon, 13 Feb 2017 07:53:00 +0000 (+0800) Subject: ArmPlatformPkg/PL061Gpio: fix the offset value in Get function X-Git-Tag: edk2-stable201903~4636 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=d176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f ArmPlatformPkg/PL061Gpio: fix the offset value in Get function When call PL061GetPins() or PL061SetPins(), should use GPIO_PIN_MASK(offset) as parameter, not offset. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang Reviewed-by: Ard Biesheuvel --- diff --git a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c index ff8bb3be85..81b9f6daec 100644 --- a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c +++ b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c @@ -186,7 +186,7 @@ Get ( return EFI_INVALID_PARAMETER; } - if (PL061GetPins (RegisterBase, Offset)) { + if (PL061GetPins (RegisterBase, GPIO_PIN_MASK(Offset))) { *Value = 1; } else { *Value = 0;