diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-10-27 17:23:37 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2021-11-01 05:10:11 +0300 |
commit | 74bf2048e6e18ba310c62827d90f5ef76119bff6 (patch) | |
tree | dff166e9edd0cabb57b4c798f0f1a1c01801c7b6 | |
parent | 144cb060831189ec0fb985bf66ec7a3156e3d7dd (diff) | |
download | u-boot-74bf2048e6e18ba310c62827d90f5ef76119bff6.tar.xz |
x86: tangier: pinmux: Move is_protected assignment closer to its user
Move is_protected assignment closer to its user.
This increases readability and makes maintenance easier.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r-- | arch/x86/cpu/tangier/pinmux.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c index 8385167b2b..883860f75e 100644 --- a/arch/x86/cpu/tangier/pinmux.c +++ b/arch/x86/cpu/tangier/pinmux.c @@ -162,8 +162,6 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) u32 mask; int ret; - is_protected = ofnode_read_bool(pin_node, "protected"); - pad_offset = ofnode_read_s32_default(pin_node, "pad-offset", -1); if (pad_offset == -1) return -EINVAL; @@ -178,6 +176,7 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) if (mode & ~mask) return -ENOTSUPP; + is_protected = ofnode_read_bool(pin_node, "protected"); if (is_protected) ret = mrfld_pinconfig_protected(pad_offset, mask, mode); else |