diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-07-22 05:45:34 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-07-26 09:05:29 -0400 |
commit | 61c68502321d94a421f9a2a32f6789ecb27f382d (patch) | |
tree | f11a63bf01c5438d5c44deb14e45f38d85aec243 /arch/arm/plat-mxc/include/mach/devices-common.h | |
parent | a7d945a469ee566bde26217362c95f29acfbd14a (diff) |
imx: dynamically register flexcan devices for mx25 and mx35
In order to make this patch compile, even if the flexcan driver with
it's header defining the platform data isn't merged yet, two ifdefs have
been added. They effect that the "imx_add_flexcan" function results in a
no-op function if the driver hasn't been activated.
These ifdefs can be removed after the flexcan driver has been merged.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/devices-common.h')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/devices-common.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 05c8d3f0a08f..c5f68c587309 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -14,6 +14,24 @@ struct platform_device *imx_add_platform_device(const char *name, int id, | |||
14 | const struct resource *res, unsigned int num_resources, | 14 | const struct resource *res, unsigned int num_resources, |
15 | const void *data, size_t size_data); | 15 | const void *data, size_t size_data); |
16 | 16 | ||
17 | #if defined (CONFIG_CAN_FLEXCAN) || defined (CONFIG_CAN_FLEXCAN_MODULE) | ||
18 | #include <linux/can/platform/flexcan.h> | ||
19 | struct platform_device *__init imx_add_flexcan(int id, | ||
20 | resource_size_t iobase, resource_size_t iosize, | ||
21 | resource_size_t irq, | ||
22 | const struct flexcan_platform_data *pdata); | ||
23 | #else | ||
24 | /* the ifdef can be removed once the flexcan driver has been merged */ | ||
25 | struct flexcan_platform_data; | ||
26 | static inline struct platform_device *__init imx_add_flexcan(int id, | ||
27 | resource_size_t iobase, resource_size_t iosize, | ||
28 | resource_size_t irq, | ||
29 | const struct flexcan_platform_data *pdata) | ||
30 | { | ||
31 | return NULL; | ||
32 | } | ||
33 | #endif | ||
34 | |||
17 | #include <mach/i2c.h> | 35 | #include <mach/i2c.h> |
18 | struct platform_device *__init imx_add_imx_i2c(int id, | 36 | struct platform_device *__init imx_add_imx_i2c(int id, |
19 | resource_size_t iobase, resource_size_t iosize, int irq, | 37 | resource_size_t iobase, resource_size_t iosize, int irq, |