Skip to content

Commit 3bcfd55

Browse files
committed
pinctrl: cherryview: Convert to use intel_gpio_add_pin_ranges()
Driver is ready to use intel_gpio_add_pin_ranges() directly instead of custom approach. Convert it now. Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent 2f61c00 commit 3bcfd55

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

drivers/pinctrl/intel/pinctrl-cherryview.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,24 +1511,6 @@ static int chv_gpio_irq_init_hw(struct gpio_chip *chip)
15111511
return 0;
15121512
}
15131513

1514-
static int chv_gpio_add_pin_ranges(struct gpio_chip *chip)
1515-
{
1516-
struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
1517-
struct device *dev = pctrl->dev;
1518-
const struct intel_community *community = &pctrl->communities[0];
1519-
const struct intel_padgroup *gpp;
1520-
int ret, i;
1521-
1522-
for (i = 0; i < community->ngpps; i++) {
1523-
gpp = &community->gpps[i];
1524-
ret = gpiochip_add_pin_range(chip, dev_name(dev), gpp->base, gpp->base, gpp->size);
1525-
if (ret)
1526-
return dev_err_probe(dev, ret, "failed to add GPIO pin range\n");
1527-
}
1528-
1529-
return 0;
1530-
}
1531-
15321514
static int chv_gpio_probe(struct intel_pinctrl *pctrl, int irq)
15331515
{
15341516
const struct intel_community *community = &pctrl->communities[0];
@@ -1542,7 +1524,7 @@ static int chv_gpio_probe(struct intel_pinctrl *pctrl, int irq)
15421524

15431525
chip->ngpio = pctrl->soc->pins[pctrl->soc->npins - 1].number + 1;
15441526
chip->label = dev_name(dev);
1545-
chip->add_pin_ranges = chv_gpio_add_pin_ranges;
1527+
chip->add_pin_ranges = intel_gpio_add_pin_ranges;
15461528
chip->parent = dev;
15471529
chip->base = -1;
15481530

0 commit comments

Comments
 (0)