lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1396620278-18107-1-git-send-email-linus.walleij@linaro.org>
Date:	Fri,  4 Apr 2014 16:04:38 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc:	linux-gpio@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>,
	Srinivas Kandagatla <srinivas.kandagatla@...com>,
	Maxime COQUELIN <maxime.coquelin@...com>,
	Giuseppe Cavallaro <peppe.cavallaro@...com>
Subject: [PATCH] pinctrl: st: switch IRQ locking to resource callbacks

In the mass-conversion to the new irqchip callbacks, this
in-transit IRQ support was missed. Fix it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@...com>
Cc: Maxime COQUELIN <maxime.coquelin@...com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
 drivers/pinctrl/pinctrl-st.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index bd725b0a4341..639af4a9a2e4 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1312,25 +1312,23 @@ static void st_gpio_irq_unmask(struct irq_data *d)
 	writel(BIT(d->hwirq), bank->base + REG_PIO_SET_PMASK);
 }
 
-static unsigned int st_gpio_irq_startup(struct irq_data *d)
+static int st_gpio_irq_reqres(struct irq_data *d)
 {
 	struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
 
-	if (gpio_lock_as_irq(&bank->gpio_chip, d->hwirq))
+	if (gpio_lock_as_irq(&bank->gpio_chip, d->hwirq)) {
 		dev_err(bank->gpio_chip.dev,
 			"unable to lock HW IRQ %lu for IRQ\n",
 			d->hwirq);
-
-	st_gpio_irq_unmask(d);
-
+		return -EINVAL;
+	}
 	return 0;
 }
 
-static void st_gpio_irq_shutdown(struct irq_data *d)
+static void st_gpio_irq_relres(struct irq_data *d)
 {
 	struct st_gpio_bank *bank = irq_data_get_irq_chip_data(d);
 
-	st_gpio_irq_mask(d);
 	gpio_unlock_as_irq(&bank->gpio_chip, d->hwirq);
 }
 
@@ -1491,8 +1489,8 @@ static struct irq_chip st_gpio_irqchip = {
 	.irq_mask	= st_gpio_irq_mask,
 	.irq_unmask	= st_gpio_irq_unmask,
 	.irq_set_type	= st_gpio_irq_set_type,
-	.irq_startup	= st_gpio_irq_startup,
-	.irq_shutdown	= st_gpio_irq_shutdown,
+	.irq_request_resources = st_gpio_irq_reqres,
+	.irq_release_resources = st_gpio_irq_relres,
 };
 
 static int st_gpio_irq_domain_map(struct irq_domain *h,
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ