diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-04 07:02:35 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 04:01:26 -0500 |
commit | fc40d0191943fa995f5359b5c23aa7c3dea69d7b (patch) | |
tree | 99d105dce9fd693b30dd3d577212838885d0c6a2 /arch/arm/plat-mxc/include/mach/devices-common.h | |
parent | e0a1961df8ad898b661cf0adcf3519254f135a44 (diff) |
ARM: imx: change the way flexcan devices are registered
Group soc specific data in a global struct instead of repeating it for each
call to imxXX_add_flexcanX. The structs holding the actual data are placed
in .init.constdata and so don't do much harm. Compared to the previous
approach this reduces code size to call imx_add_flexcan.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@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 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index a0ac84542298..830369ea80d0 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -34,9 +34,14 @@ struct platform_device *__init imx_add_fec( | |||
34 | const struct fec_platform_data *pdata); | 34 | const struct fec_platform_data *pdata); |
35 | 35 | ||
36 | #include <linux/can/platform/flexcan.h> | 36 | #include <linux/can/platform/flexcan.h> |
37 | struct platform_device *__init imx_add_flexcan(int id, | 37 | struct imx_flexcan_data { |
38 | resource_size_t iobase, resource_size_t iosize, | 38 | int id; |
39 | resource_size_t irq, | 39 | resource_size_t iobase; |
40 | resource_size_t iosize; | ||
41 | resource_size_t irq; | ||
42 | }; | ||
43 | struct platform_device *__init imx_add_flexcan( | ||
44 | const struct imx_flexcan_data *data, | ||
40 | const struct flexcan_platform_data *pdata); | 45 | const struct flexcan_platform_data *pdata); |
41 | 46 | ||
42 | #include <linux/gpio_keys.h> | 47 | #include <linux/gpio_keys.h> |