diff options
author | Michal Simek <michal.simek@xilinx.com> | 2018-06-13 13:22:08 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-06-15 08:54:05 +0200 |
commit | 01fcf01e8194d65985da4432f53394bfcb98cbfe (patch) | |
tree | 46792e0ba44b3de08072f1f390390b16b02915f1 | |
parent | e3c26b8d954084613de7a13fa6472d2f03429d0e (diff) | |
download | u-boot-01fcf01e8194d65985da4432f53394bfcb98cbfe.tar.gz u-boot-01fcf01e8194d65985da4432f53394bfcb98cbfe.tar.xz u-boot-01fcf01e8194d65985da4432f53394bfcb98cbfe.zip |
gpio: zynq_gpio: bank description should use unsigned type
Use u32 instead of int for max_bank, bank_min and bank_max. These values
can't be negative that's why no reason to use signed type.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | drivers/gpio/zynq_gpio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c index 442ba196ca..8d84e3fc13 100644 --- a/drivers/gpio/zynq_gpio.c +++ b/drivers/gpio/zynq_gpio.c @@ -111,9 +111,9 @@ struct zynq_gpio_privdata { struct zynq_platform_data { const char *label; u16 ngpio; - int max_bank; - int bank_min[ZYNQMP_GPIO_MAX_BANK]; - int bank_max[ZYNQMP_GPIO_MAX_BANK]; + u32 max_bank; + u32 bank_min[ZYNQMP_GPIO_MAX_BANK]; + u32 bank_max[ZYNQMP_GPIO_MAX_BANK]; }; static const struct zynq_platform_data zynqmp_gpio_def = { @@ -165,7 +165,7 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, struct udevice *dev) { struct zynq_gpio_privdata *priv = dev_get_priv(dev); - int bank; + u32 bank; for (bank = 0; bank < priv->p_data->max_bank; bank++) { if ((pin_num >= priv->p_data->bank_min[bank]) && |