Skip to contentSkip to conversation

ARM: S5PC110/S5PC210: Add the C Preprocessor directives for gpio.h

PATCH New Kyungmin Park 2 participants 3 messages Aug 2, 2010 – Aug 3, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ARM: S5PC110/S5PC210: Add the C Preprocessor directives for gpio.h

From: Kyungmin Park <[email protected]>

Make a buile error when include the mach/gpio.h directly.

---
 arch/arm/mach-s5pv210/include/mach/gpio.h |    4 ++++
 arch/arm/mach-s5pv310/include/mach/gpio.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/include/mach/gpio.h +4 -0
index 1f4b595..7798693 100644
@@ -13,6 +13,10 @@
 #ifndef __ASM_ARCH_GPIO_H
 #define __ASM_ARCH_GPIO_H __FILE__
 
+#ifndef __LINUX_GPIO_H
+#error "Don't include the mach/gpio.h directly. use the linux/gpio.h"
+#endif
+
 #define gpio_get_value	__gpio_get_value
 #define gpio_set_value	__gpio_set_value
 #define gpio_cansleep	__gpio_cansleep
arch/arm/mach-s5pv310/include/mach/gpio.h +4 -0
index 20cb80c..3f751f2 100644
@@ -13,6 +13,10 @@
 #ifndef __ASM_ARCH_GPIO_H
 #define __ASM_ARCH_GPIO_H __FILE__
 
+#ifndef __LINUX_GPIO_H
+#error "Don't include the mach/gpio.h directly. use the linux/gpio.h"
+#endif
+
 #define gpio_get_value	__gpio_get_value
 #define gpio_set_value	__gpio_set_value
 #define gpio_cansleep	__gpio_cansleep
Signature · 1 line
1.5.3.3
#1 lore raw

PATCH 1/3 ARM: S5PC110/S5PC210: Add the C Preprocessor directives for gpio.h

Quoted 34 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Make a buile error when include the mach/gpio.h directly.

---
 arch/arm/mach-s5pv210/include/mach/gpio.h |    4 ++++
 arch/arm/mach-s5pv310/include/mach/gpio.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/gpio.h +0 -0

s5pv210/include/mach/gpio.h
index 1f4b595..7798693 100644

arch/arm/mach-s5pv210/include/mach/gpio.h +4 -0
@@ -13,6 +13,10 @@
 #ifndef __ASM_ARCH_GPIO_H
 #define __ASM_ARCH_GPIO_H __FILE__
 
+#ifndef __LINUX_GPIO_H
+#error "Don't include the mach/gpio.h directly. use the linux/gpio.h"
+#endif
+
 #define gpio_get_value	__gpio_get_value
 #define gpio_set_value	__gpio_set_value
 #define gpio_cansleep	__gpio_cansleep
arch/arm/mach- renamed from arch/arm/mach-s5pv310/include/mach/gpio.h +0 -0

s5pv310/include/mach/gpio.h
index 20cb80c..3f751f2 100644

arch/arm/mach-s5pv310/include/mach/gpio.h +0 -0
@@ -13,6 +13,10 @@
 #ifndef __ASM_ARCH_GPIO_H

arch/arm/mach-s5pv310/include/mach/gpio.h

Quoted 10 lines
arch/arm/mach-s5pv310/include/mach/gpio.h +4 -1
 #define __ASM_ARCH_GPIO_H __FILE__
 
+#ifndef __LINUX_GPIO_H
+#error "Don't include the mach/gpio.h directly. use the linux/gpio.h"
+#endif
+
 #define gpio_get_value	__gpio_get_value
 #define gpio_set_value	__gpio_set_value
 #define gpio_cansleep	__gpio_cansleep
--

Again, Cc'ed Ben Dooks...Please add him in Cc...

_ARCH_ARM_GPIO_H is better...if defined it, it means including mach/gpio.h...

Anyway...but I think we no need above warning message...because I will check it before merging in my tree...
And if required, I will fix all of samsung stuff about inclusion mach/gpio.h...

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#2 lore raw

PATCH 1/3 ARM: S5PC110/S5PC210: Add the C Preprocessor directives for gpio.h

Quoted 37 lines · Kukjin Kim
Quoted 36 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Make a buile error when include the mach/gpio.h directly.

---
?arch/arm/mach-s5pv210/include/mach/gpio.h | ? ?4 ++++ ?arch/arm/mach-s5pv310/include/mach/gpio.h | ? ?4 ++++ ?2 files changed, 8 insertions(+), 0 deletions(-)

arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/gpio.h +0 -0

s5pv210/include/mach/gpio.h
index 1f4b595..7798693 100644

arch/arm/mach-s5pv210/include/mach/gpio.h +0 -0
@@ -13,6 +13,10 @@

?#ifndef __ASM_ARCH_GPIO_H
?#define __ASM_ARCH_GPIO_H __FILE__

arch/arm/mach-s5pv210/include/mach/gpio.h +4 -0
+#ifndef __LINUX_GPIO_H
+#error "Don't include the mach/gpio.h directly. use the linux/gpio.h"
+#endif
+

?#define gpio_get_value ? ? ? __gpio_get_value
?#define gpio_set_value ? ? ? __gpio_set_value
?#define gpio_cansleep ? ? ? ?__gpio_cansleep

arch/arm/mach- renamed from arch/arm/mach-s5pv310/include/mach/gpio.h +0 -0

s5pv310/include/mach/gpio.h
index 20cb80c..3f751f2 100644

arch/arm/mach-s5pv310/include/mach/gpio.h +0 -0
@@ -13,6 +13,10 @@

?#ifndef __ASM_ARCH_GPIO_H
?#define __ASM_ARCH_GPIO_H __FILE__

Quoted 10 lines
Quoted 8 lines
arch/arm/mach-s5pv310/include/mach/gpio.h +4 -0
+#ifndef __LINUX_GPIO_H
+#error "Don't include the mach/gpio.h directly. use the linux/gpio.h"
+#endif
+

?#define gpio_get_value ? ? ? __gpio_get_value
?#define gpio_set_value ? ? ? __gpio_set_value
?#define gpio_cansleep ? ? ? ?__gpio_cansleep
--

Again, Cc'ed Ben Dooks...Please add him in Cc...

I can't find any reason to cc to him. In previous time, Ben said you take the s5p series. and that's I agreed.
I just want to contact the proper person on each patch. If I touch the common part, I'll add him.

Quoted 6 lines

_ARCH_ARM_GPIO_H is better...if defined it, it means including mach/gpio.h...

Anyway...but I think we no need above warning message...because I will check it before merging in my tree...

It's not warning message. It can't build if someone includes the mach/gpio.h directly.
So fix it early. No need to check it. why do you go difficult way?

Quoted 12 lines

And if required, I will fix all of samsung stuff about inclusion mach/gpio.h...

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.