Commit a7f2bdb3 authored by Antonio Ospite's avatar Antonio Ospite Committed by Eric Miao

[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: default avatarAntonio Ospite <ospite@studenti.unina.it>
Acked-by: default avatarMike Rapoport <mike@compulab.co.il>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent db205463
...@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {} ...@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {}
#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
static struct regulator *em_x270_camera_ldo; static struct regulator *em_x270_camera_ldo;
static int em_x270_sensor_init(struct device *dev) static int em_x270_sensor_init(void)
{ {
int ret; int ret;
...@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev) ...@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev)
} }
struct pxacamera_platform_data em_x270_camera_platform_data = { struct pxacamera_platform_data em_x270_camera_platform_data = {
.init = em_x270_sensor_init,
.flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
.mclk_10khz = 2600, .mclk_10khz = 2600,
...@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = { ...@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = {
static void __init em_x270_init_camera(void) static void __init em_x270_init_camera(void)
{ {
pxa_set_camera_info(&em_x270_camera_platform_data); if (em_x270_sensor_init() == 0) {
platform_device_register(&em_x270_camera); pxa_set_camera_info(&em_x270_camera_platform_data);
platform_device_register(&em_x270_camera);
}
} }
#else #else
static inline void em_x270_init_camera(void) {} static inline void em_x270_init_camera(void) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment