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: <20080527142029.GA31778@polina.dev.rtsoft.ru>
Date:	Tue, 27 May 2008 18:20:29 +0400
From:	Anton Vorontsov <avorontsov@...mvista.com>
To:	David Brownell <dbrownell@...rs.sourceforge.net>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: fix build errors for drivers not strictly requiring
	GPIOs

Since commit 7560fa60fcdcdb0da662f6a9fad9064b554ef46c (gpio: <linux/gpio.h>
and "no GPIO support here" stubs) drivers can use GPIOs if they're available,
but don't require them.

This patch actually enables this feature, otherwise drivers will stumble
against this:

include/asm-generic/gpio.h:111: error: redefinition of 'gpio_is_valid'
include/linux/gpio.h:21: error: previous definition of 'gpio_is_valid' was here
include/asm-generic/gpio.h:121: error: redefinition of 'gpio_cansleep'
include/linux/gpio.h:60: error: previous definition of 'gpio_cansleep' was here
include/asm-generic/gpio.h:126: error: redefinition of 'gpio_get_value_cansleep'
include/linux/gpio.h:67: error: previous definition of 'gpio_get_value_cansleep' was here
include/asm-generic/gpio.h:132: error: redefinition of 'gpio_set_value_cansleep'
include/linux/gpio.h:74: error: previous definition of 'gpio_set_value_cansleep' was here

Signed-off-by: Anton Vorontsov <avorontsov@...mvista.com>
---
 include/asm-generic/gpio.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 9c03b71..c9bcbd6 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -105,7 +105,7 @@ extern void __gpio_set_value(unsigned gpio, int value);
 extern int __gpio_cansleep(unsigned gpio);
 
 
-#else
+#elif defined(CONFIG_GENERIC_GPIO)
 
 static inline int gpio_is_valid(int number)
 {
-- 
1.5.5.1
--
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