pinctrl: msm: Remove impossible WARN_ON()s
All these functions are limited in what they can pass as the gpio or irq number to whatever is setup during probe. Remove the checks. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
7cc34e2e1a
commit
1a0840ae03
|
@ -428,8 +428,6 @@ static int msm_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
|
|||
u32 val;
|
||||
|
||||
g = &pctrl->soc->groups[offset];
|
||||
if (WARN_ON(g->io_reg < 0))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
@ -450,8 +448,6 @@ static int msm_gpio_direction_output(struct gpio_chip *chip, unsigned offset, in
|
|||
u32 val;
|
||||
|
||||
g = &pctrl->soc->groups[offset];
|
||||
if (WARN_ON(g->io_reg < 0))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
@ -478,8 +474,6 @@ static int msm_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||
u32 val;
|
||||
|
||||
g = &pctrl->soc->groups[offset];
|
||||
if (WARN_ON(g->io_reg < 0))
|
||||
return -EINVAL;
|
||||
|
||||
val = readl(pctrl->regs + g->io_reg);
|
||||
return !!(val & BIT(g->in_bit));
|
||||
|
@ -493,8 +487,6 @@ static void msm_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
|||
u32 val;
|
||||
|
||||
g = &pctrl->soc->groups[offset];
|
||||
if (WARN_ON(g->io_reg < 0))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
@ -643,8 +635,6 @@ static void msm_gpio_irq_mask(struct irq_data *d)
|
|||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
if (WARN_ON(g->intr_cfg_reg < 0))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
@ -666,8 +656,6 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
|
|||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
if (WARN_ON(g->intr_status_reg < 0))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
@ -693,8 +681,6 @@ static void msm_gpio_irq_ack(struct irq_data *d)
|
|||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
if (WARN_ON(g->intr_status_reg < 0))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
@ -719,8 +705,6 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
|||
|
||||
pctrl = irq_data_get_irq_chip_data(d);
|
||||
g = &pctrl->soc->groups[d->hwirq];
|
||||
if (WARN_ON(g->intr_cfg_reg < 0))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
|
||||
|
|
Loading…
Reference in New Issue