Skip to content

Commit 4a23447

Browse files
leoliu-ocopsiff
authored andcommitted
pinctrl: zhaoxin: fix issues when builting into module
Add missing header file declarations due to changes in code version. And fix other issues that are causing built errors. Signed-off-by: leoliu-oc <leoliu-oc@zhaoxin.com> Link: deepin-community#275 (cherry picked from commit 051c968) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 269dea7 commit 4a23447

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,11 @@
2121
#include <linux/pinctrl/pinmux.h>
2222
#include <linux/pinctrl/pinconf.h>
2323
#include <linux/pinctrl/pinconf-generic.h>
24+
#include <linux/pinctrl/consumer.h>
2425

2526
#include "../core.h"
2627
#include "pinctrl-zhaoxin.h"
2728

28-
static int pin_to_hwgpio(struct pinctrl_gpio_range *range, unsigned int pin)
29-
{
30-
int offset = 0;
31-
32-
if (range->pins) {
33-
for (offset = 0; offset < range->npins; offset++)
34-
if (pin == range->pins[offset])
35-
break;
36-
return range->base+offset-range->gc->base;
37-
} else
38-
return pin-range->pin_base+range->base-range->gc->base;
39-
}
40-
4129
static u16 zx_pad_read16(struct zhaoxin_pinctrl *pctrl, u8 index)
4230
{
4331
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)
498486
else if (type & IRQ_TYPE_LEVEL_HIGH)
499487
value |= TRIGGER_HIGH_LEVEL << (point*4);
500488
else
501-
pr_debug(pctrl, "%s wrang type\n", __func__);
489+
pr_debug("%s wrong type\n", __func__);
502490

503491
zx_pad_write16(pctrl, index, value);
504492

0 commit comments

Comments
 (0)