summaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-migor/setup.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski2009-12-11 15:31:35 +0100
committerMauro Carvalho Chehab2009-12-16 12:27:19 +0100
commit0f4482940a75b52db931e1fff181c9d267e462d2 (patch)
treef1b354771394b99aaecbbf56e1c3d82b522b50a4 /arch/sh/boards/mach-migor/setup.c
parentV4L/DVB (13648): soc-camera: add a private field to struct soc_camera_link (diff)
downloadkernel-qcow2-linux-0f4482940a75b52db931e1fff181c9d267e462d2.tar.gz
kernel-qcow2-linux-0f4482940a75b52db931e1fff181c9d267e462d2.tar.xz
kernel-qcow2-linux-0f4482940a75b52db931e1fff181c9d267e462d2.zip
V4L/DVB (13650): soc-camera: switch drivers and platforms to use .priv in struct soc_camera_link
After this change drivers can be further extended to not fail, if they don't get platform data, but to use defaults. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/sh/boards/mach-migor/setup.c')
-rw-r--r--arch/sh/boards/mach-migor/setup.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 9099b6da9957..507c77be476d 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -432,23 +432,27 @@ static struct i2c_board_info migor_i2c_camera[] = {
static struct ov772x_camera_info ov7725_info = {
.buswidth = SOCAM_DATAWIDTH_8,
- .link = {
- .power = ov7725_power,
- .board_info = &migor_i2c_camera[0],
- .i2c_adapter_id = 0,
- .module_name = "ov772x",
- },
+};
+
+static struct soc_camera_link ov7725_link = {
+ .power = ov7725_power,
+ .board_info = &migor_i2c_camera[0],
+ .i2c_adapter_id = 0,
+ .module_name = "ov772x",
+ .priv = &ov7725_info,
};
static struct tw9910_video_info tw9910_info = {
.buswidth = SOCAM_DATAWIDTH_8,
.mpout = TW9910_MPO_FIELD,
- .link = {
- .power = tw9910_power,
- .board_info = &migor_i2c_camera[1],
- .i2c_adapter_id = 0,
- .module_name = "tw9910",
- }
+};
+
+static struct soc_camera_link tw9910_link = {
+ .power = tw9910_power,
+ .board_info = &migor_i2c_camera[1],
+ .i2c_adapter_id = 0,
+ .module_name = "tw9910",
+ .priv = &tw9910_info,
};
static struct platform_device migor_camera[] = {
@@ -456,13 +460,13 @@ static struct platform_device migor_camera[] = {
.name = "soc-camera-pdrv",
.id = 0,
.dev = {
- .platform_data = &ov7725_info.link,
+ .platform_data = &ov7725_link,
},
}, {
.name = "soc-camera-pdrv",
.id = 1,
.dev = {
- .platform_data = &tw9910_info.link,
+ .platform_data = &tw9910_link,
},
},
};