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-next>] [day] [month] [year] [list]
Message-Id: <1474045133-3892-1-git-send-email-singh.amitesh@gmail.com>
Date:   Fri, 16 Sep 2016 22:28:53 +0530
From:   Amitesh Singh <singh.amitesh@...il.com>
To:     linus.walleij@...aro.org, gnurou@...il.com
Cc:     linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: f7188x: use gpiochip_get_data instead of container_of

gpiochip_add_data is already used to add data pointer and chip.
Lets rely on gpiochip_get_data which is getting used in other
gpio_chip functions.

Signed-off-by: Amitesh Singh <singh.amitesh@...il.com>
---
 drivers/gpio/gpio-f7188x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c
index 600be84..e8accde 100644
--- a/drivers/gpio/gpio-f7188x.c
+++ b/drivers/gpio/gpio-f7188x.c
@@ -214,8 +214,7 @@ static struct f7188x_gpio_bank f81866_gpio_bank[] = {
 static int f7188x_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
 {
 	int err;
-	struct f7188x_gpio_bank *bank =
-		container_of(chip, struct f7188x_gpio_bank, chip);
+	struct f7188x_gpio_bank *bank = gpiochip_get_data(chip);
 	struct f7188x_sio *sio = bank->data->sio;
 	u8 dir;
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ