Skip to contentSkip to conversation

ARM: SAMSUNG: Guard against multiple inclusion of plat/dma.h

PATCH New Mark Brown 2 participants 4 messages Dec 23, 2011 – Dec 24, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/2 ARM: SAMSUNG: Guard against multiple inclusion of plat/dma.h

Otherwise it'll generate errors if included twice.

---
 arch/arm/plat-samsung/include/plat/dma.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/dma.h +5 -0
index b906112..baa05ed 100644
@@ -10,6 +10,9 @@
  * published by the Free Software Foundation.
 */
 
+#ifndef __PLAT_DMA_H
+#define __PLAT_DMA_H
+
 #include <linux/dma-mapping.h>
 
 enum s3c2410_dma_buffresult {
@@ -124,3 +127,5 @@ extern int s3c2410_dma_set_buffdone_fn(enum dma_ch, s3c2410_dma_cbfn_t rtn);
 
 
 #include <plat/dma-ops.h>
+
+#endif
Signature · 1 line
1.7.7.3
author
#1 lore raw

PATCH 2/2 ARM: SAMSUNG: dma-ops.h needs mach/dma.h

dma-ops.h uses samsung_dma_is_dmadev so it needs to have mach/dma.h included.

---
 arch/arm/plat-samsung/include/plat/dma-ops.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/dma-ops.h +1 -0
index 70b6325..71a6827 100644
@@ -14,6 +14,7 @@
 #define __SAMSUNG_DMA_OPS_H_ __FILE__
 
 #include <linux/dmaengine.h>
+#include <mach/dma.h>
 
 struct samsung_dma_prep_info {
 	enum dma_transaction_type cap;
Signature · 1 line
1.7.7.3
#3 lore raw

PATCH 1/2 ARM: SAMSUNG: Guard against multiple inclusion of plat/dma.h

In reply to Mark Brown
Quoted 3 lines · Mark Brown

Otherwise it'll generate errors if included twice.

Yes, right. Will apply.

Merry Christmas :)
Thanks.

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

Quoted 29 lines
---
 arch/arm/plat-samsung/include/plat/dma.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/dma.h +0 -0

samsung/include/plat/dma.h
index b906112..baa05ed 100644

arch/arm/plat-samsung/include/plat/dma.h +5 -1
@@ -10,6 +10,9 @@
  * published by the Free Software Foundation.
 */
 
+#ifndef __PLAT_DMA_H
+#define __PLAT_DMA_H
+
 #include <linux/dma-mapping.h>
 
 enum s3c2410_dma_buffresult {
@@ -124,3 +127,5 @@ extern int s3c2410_dma_set_buffdone_fn(enum dma_ch,
 s3c2410_dma_cbfn_t rtn);
 
 
 #include <plat/dma-ops.h>
+
+#endif
--

1.7.7.3

#2 lore raw

PATCH 2/2 ARM: SAMSUNG: dma-ops.h needs mach/dma.h

In reply to Mark Brown
Quoted 23 lines · Mark Brown

dma-ops.h uses samsung_dma_is_dmadev so it needs to have mach/dma.h included.

---
 arch/arm/plat-samsung/include/plat/dma-ops.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/dma-ops.h +0 -0

samsung/include/plat/dma-ops.h
index 70b6325..71a6827 100644

arch/arm/plat-samsung/include/plat/dma-ops.h +1 -1
@@ -14,6 +14,7 @@
 #define __SAMSUNG_DMA_OPS_H_ __FILE__
 
 #include <linux/dmaengine.h>
+#include <mach/dma.h>
 
 struct samsung_dma_prep_info {
 	enum dma_transaction_type cap;
--
Quoted 1 line

1.7.7.3

OK, will apply.
Thanks.

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