diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-09-16 07:59:53 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-10-14 22:05:42 -0400 |
commit | e69dc9a91eeb0387e08d8e1d0e576c88b28902fc (patch) | |
tree | 4b4ef12b66ae33e79b77528f7e9568a62743f43a /arch/arm/mach-imx/devices | |
parent | 7f917a8df68985aa38a90b7110b5f42bfa0d7cda (diff) |
video: imxfb: remove cpu_is_xxx by using platform_device_id
It changes the driver to use platform_device_id rather than cpu_is_xxx
to determine the controller type, and updates the platform code
accordingly.
As the result, mach/hardware.h inclusion gets removed from the driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Diffstat (limited to 'arch/arm/mach-imx/devices')
-rw-r--r-- | arch/arm/mach-imx/devices/devices-common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/platform-imx-fb.c | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index 4caf1c61e350..e4b790b9e2aa 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -108,6 +108,7 @@ struct platform_device *__init imx_add_imxdi_rtc( | |||
108 | 108 | ||
109 | #include <linux/platform_data/video-imxfb.h> | 109 | #include <linux/platform_data/video-imxfb.h> |
110 | struct imx_imx_fb_data { | 110 | struct imx_imx_fb_data { |
111 | const char *devid; | ||
111 | resource_size_t iobase; | 112 | resource_size_t iobase; |
112 | resource_size_t iosize; | 113 | resource_size_t iosize; |
113 | resource_size_t irq; | 114 | resource_size_t irq; |
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c index 4e6f85703918..abea28bea282 100644 --- a/arch/arm/mach-imx/devices/platform-imx-fb.c +++ b/arch/arm/mach-imx/devices/platform-imx-fb.c | |||
@@ -10,8 +10,9 @@ | |||
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include "devices-common.h" | 11 | #include "devices-common.h" |
12 | 12 | ||
13 | #define imx_imx_fb_data_entry_single(soc, _size) \ | 13 | #define imx_imx_fb_data_entry_single(soc, _devid, _size) \ |
14 | { \ | 14 | { \ |
15 | .devid = _devid, \ | ||
15 | .iobase = soc ## _LCDC_BASE_ADDR, \ | 16 | .iobase = soc ## _LCDC_BASE_ADDR, \ |
16 | .iosize = _size, \ | 17 | .iosize = _size, \ |
17 | .irq = soc ## _INT_LCDC, \ | 18 | .irq = soc ## _INT_LCDC, \ |
@@ -19,22 +20,22 @@ | |||
19 | 20 | ||
20 | #ifdef CONFIG_SOC_IMX1 | 21 | #ifdef CONFIG_SOC_IMX1 |
21 | const struct imx_imx_fb_data imx1_imx_fb_data __initconst = | 22 | const struct imx_imx_fb_data imx1_imx_fb_data __initconst = |
22 | imx_imx_fb_data_entry_single(MX1, SZ_4K); | 23 | imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K); |
23 | #endif /* ifdef CONFIG_SOC_IMX1 */ | 24 | #endif /* ifdef CONFIG_SOC_IMX1 */ |
24 | 25 | ||
25 | #ifdef CONFIG_SOC_IMX21 | 26 | #ifdef CONFIG_SOC_IMX21 |
26 | const struct imx_imx_fb_data imx21_imx_fb_data __initconst = | 27 | const struct imx_imx_fb_data imx21_imx_fb_data __initconst = |
27 | imx_imx_fb_data_entry_single(MX21, SZ_4K); | 28 | imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K); |
28 | #endif /* ifdef CONFIG_SOC_IMX21 */ | 29 | #endif /* ifdef CONFIG_SOC_IMX21 */ |
29 | 30 | ||
30 | #ifdef CONFIG_SOC_IMX25 | 31 | #ifdef CONFIG_SOC_IMX25 |
31 | const struct imx_imx_fb_data imx25_imx_fb_data __initconst = | 32 | const struct imx_imx_fb_data imx25_imx_fb_data __initconst = |
32 | imx_imx_fb_data_entry_single(MX25, SZ_16K); | 33 | imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K); |
33 | #endif /* ifdef CONFIG_SOC_IMX25 */ | 34 | #endif /* ifdef CONFIG_SOC_IMX25 */ |
34 | 35 | ||
35 | #ifdef CONFIG_SOC_IMX27 | 36 | #ifdef CONFIG_SOC_IMX27 |
36 | const struct imx_imx_fb_data imx27_imx_fb_data __initconst = | 37 | const struct imx_imx_fb_data imx27_imx_fb_data __initconst = |
37 | imx_imx_fb_data_entry_single(MX27, SZ_4K); | 38 | imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K); |
38 | #endif /* ifdef CONFIG_SOC_IMX27 */ | 39 | #endif /* ifdef CONFIG_SOC_IMX27 */ |
39 | 40 | ||
40 | struct platform_device *__init imx_add_imx_fb( | 41 | struct platform_device *__init imx_add_imx_fb( |