diff options
author | Antonio Ospite <ospite@studenti.unina.it> | 2009-11-27 15:30:23 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-11-30 20:03:14 -0500 |
commit | a7f2bdb39ed67c039ebef49e216e0fa543d6642e (patch) | |
tree | 6d28e806113bd065b68c32fad0848ffb44556578 | |
parent | db205463fd24c0972ad2c4e4fafb1c76e51b4380 (diff) |
[ARM] pxa/em-x270: don't use pxa_camera init() callback
pxa_camera init() is ambiguous, it's better to statically configure the sensor.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/em-x270.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index e0b0fda9e67e..1c0de808b54d 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {} | |||
967 | #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) | 967 | #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) |
968 | static struct regulator *em_x270_camera_ldo; | 968 | static struct regulator *em_x270_camera_ldo; |
969 | 969 | ||
970 | static int em_x270_sensor_init(struct device *dev) | 970 | static int em_x270_sensor_init(void) |
971 | { | 971 | { |
972 | int ret; | 972 | int ret; |
973 | 973 | ||
@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev) | |||
996 | } | 996 | } |
997 | 997 | ||
998 | struct pxacamera_platform_data em_x270_camera_platform_data = { | 998 | struct pxacamera_platform_data em_x270_camera_platform_data = { |
999 | .init = em_x270_sensor_init, | ||
1000 | .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | | 999 | .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | |
1001 | PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, | 1000 | PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, |
1002 | .mclk_10khz = 2600, | 1001 | .mclk_10khz = 2600, |
@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = { | |||
1049 | 1048 | ||
1050 | static void __init em_x270_init_camera(void) | 1049 | static void __init em_x270_init_camera(void) |
1051 | { | 1050 | { |
1052 | pxa_set_camera_info(&em_x270_camera_platform_data); | 1051 | if (em_x270_sensor_init() == 0) { |
1053 | platform_device_register(&em_x270_camera); | 1052 | pxa_set_camera_info(&em_x270_camera_platform_data); |
1053 | platform_device_register(&em_x270_camera); | ||
1054 | } | ||
1054 | } | 1055 | } |
1055 | #else | 1056 | #else |
1056 | static inline void em_x270_init_camera(void) {} | 1057 | static inline void em_x270_init_camera(void) {} |