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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Dec 2012 16:19:26 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	linux-kernel@...r.kernel.org
Cc:	linus.walleij@...aro.org,
	Mian Yousaf Kaukab <mian.yousaf.kaukab@...ricsson.com>,
	Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 08/21] gpio: ab8500: Fix gpio offset bounds for irq mapping

From: Mian Yousaf Kaukab <mian.yousaf.kaukab@...ricsson.com>

AB8500 gpio numbers start from 1 and not 0 so the offset
0 represents gpio 1. Fixing cluster bounds accordingly for
irq mappings.

Signed-off-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@...ricsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@...ricsson.com>
Tested-by: Jonas ABERG <jonas.aberg@...ricsson.com>
---
 drivers/gpio/gpio-ab8500.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-ab8500.c b/drivers/gpio/gpio-ab8500.c
index d3bbcce..a0253ad 100644
--- a/drivers/gpio/gpio-ab8500.c
+++ b/drivers/gpio/gpio-ab8500.c
@@ -174,9 +174,9 @@ static int ab8500_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
 		int start;
 		int end;
 	} clusters[] = {
-		{.start = 6,  .end = 13},
-		{.start = 24, .end = 25},
-		{.start = 36, .end = 41},
+		{.start = 5,  .end = 12}, /* GPIO numbers start from 1 */
+		{.start = 23, .end = 24},
+		{.start = 35, .end = 40},
 	};
 	struct ab8500_gpio *ab8500_gpio = to_ab8500_gpio(chip);
 	int base = ab8500_gpio->irq_base;
-- 
1.7.9.5

--
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