diff options
author | Sam Protsenko <semen.protsenko@linaro.org> | 2023-11-30 14:13:51 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-09 10:59:28 -0500 |
commit | da06fefcef7bf1d985338f08810e90c7f504bfad (patch) | |
tree | cb985bcf8f1de6a38389013f73fbf4722848d2ce | |
parent | aad0f6abf113a691b0c0472a26fef6b560d30abf (diff) | |
download | u-boot-da06fefcef7bf1d985338f08810e90c7f504bfad.zip u-boot-da06fefcef7bf1d985338f08810e90c7f504bfad.tar.gz u-boot-da06fefcef7bf1d985338f08810e90c7f504bfad.tar.bz2 |
pinctrl: exynos: Reduce variables scope
Pull some variables declared in exynos_pinctrl_set_state() into its
loop, to reduce their scope. Style commit, no functional change.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r-- | drivers/pinctrl/exynos/pinctrl-exynos.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos.c b/drivers/pinctrl/exynos/pinctrl-exynos.c index e79ce51..b6af3be 100644 --- a/drivers/pinctrl/exynos/pinctrl-exynos.c +++ b/drivers/pinctrl/exynos/pinctrl-exynos.c @@ -120,10 +120,8 @@ int exynos_pinctrl_set_state(struct udevice *dev, struct udevice *config) struct exynos_pinctrl_priv *priv = dev_get_priv(dev); const void *fdt = gd->fdt_blob; int node = dev_of_offset(config); - unsigned int count, idx, pin_num; + unsigned int count, idx; unsigned int pinvals[PINCFG_TYPE_NUM]; - unsigned long reg; - const char *name; /* * refer to the following document for the pinctrl bindings @@ -141,7 +139,10 @@ int exynos_pinctrl_set_state(struct udevice *dev, struct udevice *config) for (idx = 0; idx < count; idx++) { const struct samsung_pin_bank_data *bank; + unsigned int pin_num; char bank_name[10]; + unsigned long reg; + const char *name; int pincfg; name = fdt_stringlist_get(fdt, node, "samsung,pins", idx, NULL); |