Skip to content

Commit 52c62a3

Browse files
committed
pinctrl: intel: Inline intel_gpio_community_irq_handler()
Since we have for_each_intel_pad_group() helper, there is no advantage of having intel_gpio_community_irq_handler(). Inline it into intel_gpio_irq(). Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 74367ad commit 52c62a3

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

drivers/pinctrl/intel/pinctrl-intel.c

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,14 +1256,16 @@ static const struct irq_chip intel_gpio_irq_chip = {
12561256
GPIOCHIP_IRQ_RESOURCE_HELPERS,
12571257
};
12581258

1259-
static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
1260-
const struct intel_community *community)
1259+
static irqreturn_t intel_gpio_irq(int irq, void *data)
12611260
{
1261+
const struct intel_community *community;
12621262
const struct intel_padgroup *padgrp;
1263-
struct gpio_chip *gc = &pctrl->chip;
1263+
struct intel_pinctrl *pctrl = data;
12641264
int ret = 0;
12651265

1266-
for_each_intel_community_pad_group(community, padgrp) {
1266+
/* Need to check all communities for pending interrupts */
1267+
for_each_intel_pad_group(pctrl, community, padgrp) {
1268+
struct gpio_chip *gc = &pctrl->chip;
12671269
unsigned long pending, enabled;
12681270
unsigned int gpp, gpp_offset;
12691271
void __iomem *reg, *is;
@@ -1287,19 +1289,6 @@ static int intel_gpio_community_irq_handler(struct intel_pinctrl *pctrl,
12871289
ret += pending ? 1 : 0;
12881290
}
12891291

1290-
return ret;
1291-
}
1292-
1293-
static irqreturn_t intel_gpio_irq(int irq, void *data)
1294-
{
1295-
const struct intel_community *community;
1296-
struct intel_pinctrl *pctrl = data;
1297-
int ret = 0;
1298-
1299-
/* Need to check all communities for pending interrupts */
1300-
for_each_intel_pin_community(pctrl, community)
1301-
ret += intel_gpio_community_irq_handler(pctrl, community);
1302-
13031292
return IRQ_RETVAL(ret);
13041293
}
13051294

0 commit comments

Comments
 (0)