unsigned pintbit = hwirq_to_pintbit(port, d->hwirq);
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
if (readl(®s->invert_set) & pintbit)
writel(pintbit, ®s->request);
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
}
unsigned pintbit = hwirq_to_pintbit(port, d->hwirq);
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
if (readl(®s->invert_set) & pintbit)
writel(pintbit, ®s->request);
writel(pintbit, ®s->mask_clear);
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
}
struct gpio_pint_regs *regs = port->pint->regs;
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
writel(hwirq_to_pintbit(port, d->hwirq), ®s->mask_clear);
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
}
struct gpio_pint_regs *regs = port->pint->regs;
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
writel(hwirq_to_pintbit(port, d->hwirq), ®s->mask_set);
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
}
{
unsigned long flags;
struct gpio_port *port = irq_data_get_irq_chip_data(d);
- struct gpio_pint_regs *regs = port->pint->regs;
+ struct gpio_pint_regs *regs;
if (!port) {
- dev_err(port->dev, "GPIO IRQ %d :Not exist\n", d->irq);
+ pr_err("GPIO IRQ %d :Not exist\n", d->irq);
return -ENODEV;
}
+ regs = port->pint->regs;
+
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
port_setup(port, d->hwirq, true);
writew(BIT(d->hwirq), &port->regs->dir_clear);
writel(hwirq_to_pintbit(port, d->hwirq), ®s->mask_set);
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
return 0;
struct gpio_pint_regs *regs = port->pint->regs;
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
writel(hwirq_to_pintbit(port, d->hwirq), ®s->mask_clear);
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
}
{
unsigned long flags;
struct gpio_port *port = irq_data_get_irq_chip_data(d);
- struct gpio_pint_regs *pint_regs = port->pint->regs;
+ struct gpio_pint_regs *pint_regs;
unsigned pintmask;
unsigned int irq = d->irq;
int ret = 0;
char buf[16];
if (!port) {
- dev_err(port->dev, "GPIO IRQ %d :Not exist\n", irq);
+ pr_err("GPIO IRQ %d :Not exist\n", d->irq);
return -ENODEV;
}
+ pint_regs = port->pint->regs;
+
pintmask = hwirq_to_pintbit(port, d->hwirq);
spin_lock_irqsave(&port->lock, flags);
- spin_lock_irqsave(&port->pint->lock, flags);
+ spin_lock(&port->pint->lock);
/* In case of interrupt autodetect, set irq type to edge sensitive. */
if (type == IRQ_TYPE_PROBE)
}
out:
- spin_unlock_irqrestore(&port->pint->lock, flags);
+ spin_unlock(&port->pint->lock);
spin_unlock_irqrestore(&port->lock, flags);
return ret;