Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5663bb27 authored by Jiang Liu's avatar Jiang Liu Committed by Linus Walleij
Browse files

pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc



Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent f66eb498
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1412,7 +1412,7 @@ static void chv_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
{
	struct gpio_chip *gc = irq_desc_get_handler_data(desc);
	struct chv_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
	struct irq_chip *chip = irq_get_chip(irq);
	struct irq_chip *chip = irq_desc_get_chip(desc);
	unsigned long pending;
	u32 intr_line;

+1 −1
Original line number Diff line number Diff line
@@ -840,7 +840,7 @@ static void intel_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
{
	struct gpio_chip *gc = irq_desc_get_handler_data(desc);
	struct intel_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
	struct irq_chip *chip = irq_get_chip(irq);
	struct irq_chip *chip = irq_desc_get_chip(desc);
	int i;

	chained_irq_enter(chip, desc);
+2 −2
Original line number Diff line number Diff line
@@ -1118,8 +1118,8 @@ mtk_eint_debounce_process(struct mtk_pinctrl *pctl, int index)

static void mtk_eint_irq_handler(unsigned irq, struct irq_desc *desc)
{
	struct irq_chip *chip = irq_get_chip(irq);
	struct mtk_pinctrl *pctl = irq_get_handler_data(irq);
	struct irq_chip *chip = irq_desc_get_chip(desc);
	struct mtk_pinctrl *pctl = irq_desc_get_handler_data(desc);
	unsigned int status, eint_num;
	int offset, index, virq;
	const struct mtk_eint_offsets *eint_offsets =
+5 −7
Original line number Diff line number Diff line
@@ -843,10 +843,9 @@ static void nmk_gpio_irq_shutdown(struct irq_data *d)
	clk_disable(nmk_chip->clk);
}

static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc,
				   u32 status)
static void __nmk_gpio_irq_handler(struct irq_desc *desc, u32 status)
{
	struct irq_chip *host_chip = irq_get_chip(irq);
	struct irq_chip *host_chip = irq_desc_get_chip(desc);
	struct gpio_chip *chip = irq_desc_get_handler_data(desc);

	chained_irq_enter(host_chip, desc);
@@ -871,17 +870,16 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
	status = readl(nmk_chip->addr + NMK_GPIO_IS);
	clk_disable(nmk_chip->clk);

	__nmk_gpio_irq_handler(irq, desc, status);
	__nmk_gpio_irq_handler(desc, status);
}

static void nmk_gpio_latent_irq_handler(unsigned int irq,
					   struct irq_desc *desc)
static void nmk_gpio_latent_irq_handler(unsigned int irq, struct irq_desc *desc)
{
	struct gpio_chip *chip = irq_desc_get_handler_data(desc);
	struct nmk_gpio_chip *nmk_chip = container_of(chip, struct nmk_gpio_chip, chip);
	u32 status = nmk_chip->get_latent_status(nmk_chip->bank);

	__nmk_gpio_irq_handler(irq, desc, status);
	__nmk_gpio_irq_handler(desc, status);
}

/* I/O Functions */
+1 −1
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ static void amd_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
	u64 reg64;
	int handled = 0;
	unsigned long flags;
	struct irq_chip *chip = irq_get_chip(irq);
	struct irq_chip *chip = irq_desc_get_chip(desc);
	struct gpio_chip *gc = irq_desc_get_handler_data(desc);
	struct amd_gpio *gpio_dev = to_amd_gpio(gc);

Loading