Skip to contentSkip to conversation

omap: i2c: Avoid compilation error in case the header is included multiple times

PATCH In review C.A, Subramaniam 3 participants 4 messages Aug 24, 2010 – Sep 23, 2010

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

PATCH 1/1 omap: i2c: Avoid compilation error in case the header is included multiple times

Quoted 1 line

From e3c3ee9317850b2b26e02680a0c976d3c75febab Mon Sep 17 00:00:00 2001

From: Subramaniam C.A <[email protected]>
Date: Tue, 24 Aug 2010 12:02:28 -0500
Subject: [PATCH] omap: i2c: Avoid compilation error in case the header is included multiple times.

Added defines to avoid compilation error.

---
 arch/arm/plat-omap/include/plat/i2c.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/i2c.h +4 -0
index 9e085f1..5d67273 100644
@@ -18,6 +18,8 @@
  * 02110-1301 USA
  *
  */
+#ifndef __ASM__ARCH_OMAP_I2C_H
+#define __ASM__ARCH_OMAP_I2C_H
 
 #include <linux/i2c.h>
 
@@ -57,3 +59,5 @@ struct omap_i2c_dev_attr {
 
 void __init omap1_i2c_mux_pins(int bus_id);
 void __init omap2_i2c_mux_pins(int bus_id);
+
+#endif /* __ASM__ARCH_OMAP_I2C_H */

--
1.7.0.4

BR
Subbu

Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Subramaniam
Quoted 1 line

From e3c3ee9317850b2b26e02680a0c976d3c75febab Mon Sep 17 00:00:00 2001

From: Subramaniam C.A <[email protected]>
Date: Tue, 24 Aug 2010 12:02:28 -0500
Subject: [PATCH] omap: i2c: Avoid compilation error in case the header is included multiple times.

Added defines to avoid compilation error.

could you list one such case ?

Quoted 1 line
Signature · 3 lines
balbi

DefectiveByDesign.org
#2 lore raw

Hi Felipe,

Quoted 14 lines

-----Original Message-----
From: Felipe Balbi [mailto:[email protected]]
Sent: Tuesday, August 24, 2010 1:49 PM
To: C.A, Subramaniam
Cc: [email protected]; Gadiyar, Anand; [email protected]
Subject: Re: [PATCH]omap: i2c: Avoid compilation error in case the header is included multiple times

Quoted 1 line · Subramaniam
Quoted 1 line

From e3c3ee9317850b2b26e02680a0c976d3c75febab Mon Sep 17

00:00:00 2001

Quoted 3 lines

From: Subramaniam C.A <[email protected]>
Date: Tue, 24 Aug 2010 12:02:28 -0500
Subject: [PATCH] omap: i2c: Avoid compilation error in case

Quoted 6 lines

the header is included multiple times.

Quoted 3 lines

Added defines to avoid compilation error.

could you list one such case ?

This caused a compilation error for the OMAP4 tree, where the ipu_pm.c file was including plat/i2c.h and plat/omap-pm.h.
Ref: http://dev.omapzoom.org/?p=integration/kernel-omap4.git;a=blob;f=drivers/dsp/syslink/ipu_pm/ipu_pm.c;h=b1791d4e7f2113eed046d3785106360dbe1cfc86;hb=d67c37aaadb80a6209f07618302bb84e1c952e97

omap-pm.h indirectly includes plat/i2c.h and hence the compilation error.

Yes we could have removed the,

#include <plat/i2c.h>

from the ipu_pm.c file and avoided the compilation error, but it still made sense to have this patch.

Quoted 10 lines
Quoted 2 lines

--
balbi

DefectiveByDesign.org

BR
Subbu

#3 lore raw

PATCH 1/1 omap: i2c: Avoid compilation error in case the header is

In reply to C.A, Subramaniam

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: devel-omap-misc

Initial commit ID (Likely to change): 6ce3fc011cdd5b7eb72d0cacb236bbfa51f17dad

PatchWorks
http://patchwork.kernel.org/patch/127371/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=6ce3fc011cdd5b7eb72d0cacb236bbfa51f17dad