diff options
Diffstat (limited to 'drivers/pinctrl/bcm')
-rw-r--r-- | drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/bcm/pinctrl-bcm2835.c | 31 |
2 files changed, 14 insertions, 19 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c index a7cceffcedfa..bc3b232a727a 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c @@ -1384,7 +1384,7 @@ static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev, return 0; } -static struct pinconf_ops bcm281xx_pinctrl_pinconf_ops = { +static const struct pinconf_ops bcm281xx_pinctrl_pinconf_ops = { .pin_config_get = bcm281xx_pinctrl_pin_config_get, .pin_config_set = bcm281xx_pinctrl_pin_config_set, }; diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 230883168e99..0944310225db 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -92,7 +92,6 @@ struct bcm2835_pinctrl { struct gpio_chip gpio_chip; struct pinctrl_gpio_range gpio_range; - int irq_group[BCM2835_NUM_IRQS]; spinlock_t irq_lock[BCM2835_NUM_BANKS]; }; @@ -353,7 +352,7 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip, return pinctrl_gpio_direction_output(chip->base + offset); } -static struct gpio_chip bcm2835_gpio_chip = { +static const struct gpio_chip bcm2835_gpio_chip = { .label = MODULE_NAME, .owner = THIS_MODULE, .request = gpiochip_generic_request, @@ -400,7 +399,7 @@ static void bcm2835_gpio_irq_handler(struct irq_desc *desc) for (i = 0; i < ARRAY_SIZE(pc->irq); i++) { if (pc->irq[i] == irq) { - group = pc->irq_group[i]; + group = i; break; } } @@ -692,8 +691,7 @@ static int bcm2835_pctl_dt_node_to_map_func(struct bcm2835_pinctrl *pc, struct pinctrl_map *map = *maps; if (fnum >= ARRAY_SIZE(bcm2835_functions)) { - dev_err(pc->dev, "%s: invalid brcm,function %d\n", - of_node_full_name(np), fnum); + dev_err(pc->dev, "%pOF: invalid brcm,function %d\n", np, fnum); return -EINVAL; } @@ -713,8 +711,7 @@ static int bcm2835_pctl_dt_node_to_map_pull(struct bcm2835_pinctrl *pc, unsigned long *configs; if (pull > 2) { - dev_err(pc->dev, "%s: invalid brcm,pull %d\n", - of_node_full_name(np), pull); + dev_err(pc->dev, "%pOF: invalid brcm,pull %d\n", np, pull); return -EINVAL; } @@ -745,8 +742,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, pins = of_find_property(np, "brcm,pins", NULL); if (!pins) { - dev_err(pc->dev, "%s: missing brcm,pins property\n", - of_node_full_name(np)); + dev_err(pc->dev, "%pOF: missing brcm,pins property\n", np); return -EINVAL; } @@ -755,8 +751,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, if (!funcs && !pulls) { dev_err(pc->dev, - "%s: neither brcm,function nor brcm,pull specified\n", - of_node_full_name(np)); + "%pOF: neither brcm,function nor brcm,pull specified\n", + np); return -EINVAL; } @@ -766,15 +762,15 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, if (num_funcs > 1 && num_funcs != num_pins) { dev_err(pc->dev, - "%s: brcm,function must have 1 or %d entries\n", - of_node_full_name(np), num_pins); + "%pOF: brcm,function must have 1 or %d entries\n", + np, num_pins); return -EINVAL; } if (num_pulls > 1 && num_pulls != num_pins) { dev_err(pc->dev, - "%s: brcm,pull must have 1 or %d entries\n", - of_node_full_name(np), num_pins); + "%pOF: brcm,pull must have 1 or %d entries\n", + np, num_pins); return -EINVAL; } @@ -793,8 +789,8 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, if (err) goto out; if (pin >= ARRAY_SIZE(bcm2835_gpio_pins)) { - dev_err(pc->dev, "%s: invalid brcm,pins value %d\n", - of_node_full_name(np), pin); + dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n", + np, pin); err = -EINVAL; goto out; } @@ -1047,7 +1043,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) for (i = 0; i < BCM2835_NUM_IRQS; i++) { pc->irq[i] = irq_of_parse_and_map(np, i); - pc->irq_group[i] = i; if (pc->irq[i] == 0) continue; |