diff --git a/drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c b/drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c index b639f2cd079c5..bfd1bb7f022bd 100644 --- a/drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c +++ b/drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c @@ -21,23 +21,11 @@ #include #include #include +#include #include "../core.h" #include "pinctrl-zhaoxin.h" -static int pin_to_hwgpio(struct pinctrl_gpio_range *range, unsigned int pin) -{ - int offset = 0; - - if (range->pins) { - for (offset = 0; offset < range->npins; offset++) - if (pin == range->pins[offset]) - break; - return range->base+offset-range->gc->base; - } else - return pin-range->pin_base+range->base-range->gc->base; -} - static u16 zx_pad_read16(struct zhaoxin_pinctrl *pctrl, u8 index) { outb(index, pctrl->pmio_rx90+pctrl->pmio_base); @@ -498,7 +486,7 @@ static int zhaoxin_gpio_irq_type(struct irq_data *d, unsigned int type) else if (type & IRQ_TYPE_LEVEL_HIGH) value |= TRIGGER_HIGH_LEVEL << (point*4); else - pr_debug(pctrl, "%s wrang type\n", __func__); + pr_debug("%s wrong type\n", __func__); zx_pad_write16(pctrl, index, value);