]> Pileus Git - ~andy/linux/commitdiff
ARM: s3c: i2c: add platform_device forward declaration
authorArnd Bergmann <arnd@arndb.de>
Wed, 13 Feb 2013 22:08:18 +0000 (23:08 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 14 Feb 2013 14:04:40 +0000 (15:04 +0100)
A recent cleanup to the mach-osiris.c file is causing build errors
because the i2c-s3c2410.h header file is included before we see
the definition for platform_device. The fix is to make the header file
more robust against inclusion from other places. While this should
normally go through the i2c tree, the bug only exists in arm-soc
at the moment, so it's easier to fix it there before it goes upstream.

Without this patch, building s3c2410_defconfig results in:

arch/arm/mach-s3c24xx/mach-osiris.c:34:0:
include/linux/platform_data/i2c-s3c2410.h:37:26: warning: 'struct platform_device' declared inside parameter list [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
include/linux/platform_data/i2c-s3c2410.h

index 51d52e767a1955b52dc83e2510f1b5aec13ea1be..2a50048c1c44a4aa5e67b3889be7209458484d87 100644 (file)
@@ -15,6 +15,8 @@
 
 #define S3C_IICFLG_FILTER      (1<<0)  /* enable s3c2440 filter */
 
+struct platform_device;
+
 /**
  *     struct s3c2410_platform_i2c - Platform data for s3c I2C.
  *     @bus_num: The bus number to use (if possible).