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]
Message-Id: <1296487551-30938-2-git-send-email-thomas@wytron.com.tw>
Date:	Mon, 31 Jan 2011 23:25:50 +0800
From:	Thomas Chou <thomas@...ron.com.tw>
To:	Haavard Skinnemoen <hskinnemoen@...il.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Ben Dooks <ben-linux@...ff.org>
Cc:	linux-kernel@...r.kernel.org, nios2-dev@...c.et.ntust.edu.tw,
	devicetree-discuss@...ts.ozlabs.org, linux-i2c@...r.kernel.org,
	Jean Delvare <khali@...ux-fr.org>,
	Thomas Chou <thomas@...ron.com.tw>
Subject: [PATCH 2/3] of: of_gpiochip_add is needed only for gpiolib

Some gpio drivers may not use gpiolib. In this case, struct gpio_chip
is not defined and of_gpiochip_add/remove are not needed.

Signed-off-by: Thomas Chou <thomas@...ron.com.tw>
---
 include/linux/of_gpio.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 6598c04..fc96af0 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -71,9 +71,13 @@ static inline unsigned int of_gpio_count(struct device_node *np)
 	return 0;
 }
 
+#ifdef CONFIG_GPIOLIB
+
 static inline void of_gpiochip_add(struct gpio_chip *gc) { }
 static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
 
+#endif /* CONFIG_GPIOLIB */
+
 #endif /* CONFIG_OF_GPIO */
 
 /**
-- 
1.7.3.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