mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
pinctrl: pic32: change all cases of bare 'unsigned' to 'unsigned int'
Address the following warning from checkpatch.pl:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Fixes: 2ba384e6c3 ("pinctrl: pinctrl-pic32: Add PIC32 pin control driver")
Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
af5e323bd9
commit
f10f6fca87
|
|
@ -1696,7 +1696,7 @@ static inline struct pic32_gpio_bank *irqd_to_bank(struct irq_data *d)
|
|||
}
|
||||
|
||||
static inline struct pic32_gpio_bank *pctl_to_bank(struct pic32_pinctrl *pctl,
|
||||
unsigned pin)
|
||||
unsigned int pin)
|
||||
{
|
||||
return &pctl->gpio_banks[pin / PINS_PER_BANK];
|
||||
}
|
||||
|
|
@ -1709,7 +1709,7 @@ static int pic32_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
|
|||
}
|
||||
|
||||
static const char *pic32_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
|
||||
unsigned group)
|
||||
unsigned int group)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
|
|
@ -1717,9 +1717,9 @@ static const char *pic32_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
|
|||
}
|
||||
|
||||
static int pic32_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
|
||||
unsigned group,
|
||||
const unsigned **pins,
|
||||
unsigned *num_pins)
|
||||
unsigned int group,
|
||||
const unsigned int **pins,
|
||||
unsigned int *num_pins)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
|
|
@ -1745,7 +1745,7 @@ static int pic32_pinmux_get_functions_count(struct pinctrl_dev *pctldev)
|
|||
}
|
||||
|
||||
static const char *
|
||||
pic32_pinmux_get_function_name(struct pinctrl_dev *pctldev, unsigned func)
|
||||
pic32_pinmux_get_function_name(struct pinctrl_dev *pctldev, unsigned int func)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
|
|
@ -1753,9 +1753,9 @@ pic32_pinmux_get_function_name(struct pinctrl_dev *pctldev, unsigned func)
|
|||
}
|
||||
|
||||
static int pic32_pinmux_get_function_groups(struct pinctrl_dev *pctldev,
|
||||
unsigned func,
|
||||
unsigned int func,
|
||||
const char * const **groups,
|
||||
unsigned * const num_groups)
|
||||
unsigned int * const num_groups)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
|
|
@ -1766,7 +1766,7 @@ static int pic32_pinmux_get_function_groups(struct pinctrl_dev *pctldev,
|
|||
}
|
||||
|
||||
static int pic32_pinmux_enable(struct pinctrl_dev *pctldev,
|
||||
unsigned func, unsigned group)
|
||||
unsigned int func, unsigned int group)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct pic32_pin_group *pg = &pctl->groups[group];
|
||||
|
|
@ -1795,7 +1795,7 @@ static int pic32_pinmux_enable(struct pinctrl_dev *pctldev,
|
|||
|
||||
static int pic32_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
struct pinctrl_gpio_range *range,
|
||||
unsigned offset)
|
||||
unsigned int offset)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct pic32_gpio_bank *bank = gpiochip_get_data(range->gc);
|
||||
|
|
@ -1810,7 +1810,7 @@ static int pic32_gpio_request_enable(struct pinctrl_dev *pctldev,
|
|||
}
|
||||
|
||||
static int pic32_gpio_direction_input(struct gpio_chip *chip,
|
||||
unsigned offset)
|
||||
unsigned int offset)
|
||||
{
|
||||
struct pic32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
u32 mask = BIT(offset);
|
||||
|
|
@ -1820,7 +1820,7 @@ static int pic32_gpio_direction_input(struct gpio_chip *chip,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int pic32_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
static int pic32_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct pic32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
|
||||
|
|
@ -1842,7 +1842,7 @@ static int pic32_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
|||
}
|
||||
|
||||
static int pic32_gpio_direction_output(struct gpio_chip *chip,
|
||||
unsigned offset, int value)
|
||||
unsigned int offset, int value)
|
||||
{
|
||||
struct pic32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
u32 mask = BIT(offset);
|
||||
|
|
@ -1855,7 +1855,7 @@ static int pic32_gpio_direction_output(struct gpio_chip *chip,
|
|||
|
||||
static int pic32_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
struct pinctrl_gpio_range *range,
|
||||
unsigned offset, bool input)
|
||||
unsigned int offset, bool input)
|
||||
{
|
||||
struct gpio_chip *chip = range->gc;
|
||||
|
||||
|
|
@ -1876,12 +1876,12 @@ static const struct pinmux_ops pic32_pinmux_ops = {
|
|||
.gpio_set_direction = pic32_gpio_set_direction,
|
||||
};
|
||||
|
||||
static int pic32_pinconf_get(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
static int pic32_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
|
||||
unsigned long *config)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct pic32_gpio_bank *bank = pctl_to_bank(pctl, pin);
|
||||
unsigned param = pinconf_to_config_param(*config);
|
||||
unsigned int param = pinconf_to_config_param(*config);
|
||||
u32 mask = BIT(pin - bank->gpio_chip.base);
|
||||
u32 arg;
|
||||
|
||||
|
|
@ -1917,12 +1917,12 @@ static int pic32_pinconf_get(struct pinctrl_dev *pctldev, unsigned pin,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int pic32_pinconf_set(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
unsigned long *configs, unsigned num_configs)
|
||||
static int pic32_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
|
||||
unsigned long *configs, unsigned int num_configs)
|
||||
{
|
||||
struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct pic32_gpio_bank *bank = pctl_to_bank(pctl, pin);
|
||||
unsigned param;
|
||||
unsigned int param;
|
||||
u32 arg;
|
||||
unsigned int i;
|
||||
u32 offset = pin - bank->gpio_chip.base;
|
||||
|
|
@ -1987,7 +1987,7 @@ static struct pinctrl_desc pic32_pinctrl_desc = {
|
|||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int pic32_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
static int pic32_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct pic32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user