aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 17:07:35 -0400
commit15fc204afc6feb915c400159546f646eca8ba1d9 (patch)
tree51bec0710be2a0cb0bedbccbea7813f17fbc61ea /drivers/media
parentd2aa4550379f92e929af7ed1dd4f55e6a1e331f8 (diff)
parent944557116908cbe835be41bfbd39d9706da9fd71 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (56 commits) sh: Fix declaration of __kernel_sigreturn and __kernel_rt_sigreturn sh: Enable soc-camera in ap325rxa/migor/se7724 defconfigs. sh: remove stray markers. sh: defconfig updates. sh: pci: Initial PCI-Express support for SH7786 Urquell board. sh: Generic HAVE_PERF_COUNTER support. SH: convert migor to soc-camera as platform-device SH: convert ap325rxa to soc-camera as platform-device soc-camera: unify i2c camera device platform data sh: add platform data for r8a66597-hcd in setup-sh7723 sh: add platform data for r8a66597-hcd in setup-sh7366 sh: x3proto: add platform data for r8a66597-hcd sh: highlander: add platform data for r8a66597-hcd sh: sh7785lcr: add platform data for r8a66597-hcd sh: turn off irqs when disabling CMT/TMU timers sh: use kzalloc() for cpg clocks sh: unbreak WARN_ON() sh: Use generic atomic64_t implementation. sh: Revised clock function in highlander sh: Update r7780mp defconfig ...
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/ov772x.c6
-rw-r--r--drivers/media/video/tw9910.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index c0d911252862..0bce255168bd 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -1067,10 +1067,12 @@ static int ov772x_probe(struct i2c_client *client,
1067 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 1067 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
1068 int ret; 1068 int ret;
1069 1069
1070 info = client->dev.platform_data; 1070 if (!client->dev.platform_data)
1071 if (!info)
1072 return -EINVAL; 1071 return -EINVAL;
1073 1072
1073 info = container_of(client->dev.platform_data,
1074 struct ov772x_camera_info, link);
1075
1074 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { 1076 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
1075 dev_err(&adapter->dev, 1077 dev_err(&adapter->dev,
1076 "I2C-Adapter doesn't support " 1078 "I2C-Adapter doesn't support "
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index a39947643992..aa5065ea09ed 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -875,10 +875,12 @@ static int tw9910_probe(struct i2c_client *client,
875 const struct tw9910_scale_ctrl *scale; 875 const struct tw9910_scale_ctrl *scale;
876 int i, ret; 876 int i, ret;
877 877
878 info = client->dev.platform_data; 878 if (!client->dev.platform_data)
879 if (!info)
880 return -EINVAL; 879 return -EINVAL;
881 880
881 info = container_of(client->dev.platform_data,
882 struct tw9910_video_info, link);
883
882 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent), 884 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent),
883 I2C_FUNC_SMBUS_BYTE_DATA)) { 885 I2C_FUNC_SMBUS_BYTE_DATA)) {
884 dev_err(&client->dev, 886 dev_err(&client->dev,