diff options
author | Koen Kooi <koen@openembedded.org> | 2010-07-21 12:12:55 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-07-21 12:14:27 +0200 |
commit | a26f3713cbc0d76a87ed2fbb57e62515f0636f76 (patch) | |
tree | 13ee69d6dee170dfaaf17b3f34781f990eadcd4a /recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch | |
parent | 3b404a60bf9f6c3f6c63e12537cbedf69a12fecb (diff) |
linux-omap-psp 2.6.32: add patches to make the VGA and 3MP cameras work on the beagelboard xM
Diffstat (limited to 'recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch')
-rw-r--r-- | recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch new file mode 100644 index 0000000000..47c35bddcc --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch @@ -0,0 +1,84 @@ +From fe7df74595c449a47a7a86cab9d35ab7320faf16 Mon Sep 17 00:00:00 2001 +From: Sergio Aguirre <saaguirre@ti.com> +Date: Thu, 1 Jul 2010 09:12:37 -0500 +Subject: [PATCH 53/71] mt9t112: Fix null pointer kernel bug + +We were trying to access a null pointer (info) which we weren't +initializing anywhere. + +Fix this. + +Signed-off-by: Sergio Aguirre <saaguirre@ti.com> +--- + drivers/media/video/mt9t112.c | 34 +++++++++++++++++++++++----------- + 1 files changed, 23 insertions(+), 11 deletions(-) + +diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c +index 6f54394..98a4ea9 100644 +--- a/drivers/media/video/mt9t112.c ++++ b/drivers/media/video/mt9t112.c +@@ -92,7 +92,7 @@ struct mt9t112_frame_size { + struct mt9t112_priv { + struct mt9t112_platform_data *pdata; + struct v4l2_int_device *v4l2_int_device; +- struct mt9t112_camera_info *info; ++ struct mt9t112_camera_info info; + struct i2c_client *client; + struct v4l2_pix_format pix; + int model; +@@ -463,15 +463,15 @@ static int mt9t112_init_pll(const struct i2c_client *client) + + /* Replace these registers when new timing parameters are generated */ + mt9t112_set_pll_dividers(client, +- priv->info->divider.m, +- priv->info->divider.n, +- priv->info->divider.p1, +- priv->info->divider.p2, +- priv->info->divider.p3, +- priv->info->divider.p4, +- priv->info->divider.p5, +- priv->info->divider.p6, +- priv->info->divider.p7); ++ priv->info.divider.m, ++ priv->info.divider.n, ++ priv->info.divider.p1, ++ priv->info.divider.p2, ++ priv->info.divider.p3, ++ priv->info.divider.p4, ++ priv->info.divider.p5, ++ priv->info.divider.p6, ++ priv->info.divider.p7); + + /* + * TEST_BYPASS on +@@ -1015,7 +1015,7 @@ static int mt9t112_v4l2_int_s_power(struct v4l2_int_device *s, + } + if (!(priv->flags & INIT_DONE)) { + u16 param = (MT9T112_FLAG_PCLK_RISING_EDGE & +- priv->info->flags) ? 0x0001 : 0x0000; ++ priv->info.flags) ? 0x0001 : 0x0000; + + ECHECKER(ret, mt9t112_detect(client)); + ECHECKER(ret, mt9t112_init_camera(client)); +@@ -1195,6 +1195,18 @@ static int mt9t112_probe(struct i2c_client *client, + priv->client = client; + priv->pdata = client->dev.platform_data; + ++ /* Revisit: Init Sensor info settings */ ++ priv->info.divider.m = 25; ++ priv->info.divider.n = 2; ++ priv->info.divider.p1 = 0; ++ priv->info.divider.p2 = 9; ++ priv->info.divider.p3 = 0; ++ priv->info.divider.p4 = 13; ++ priv->info.divider.p5 = 13; ++ priv->info.divider.p6 = 9; ++ priv->info.divider.p7 = 0; ++ priv->info.flags = MT9T112_FLAG_PCLK_RISING_EDGE; ++ + i2c_set_clientdata(client, priv); + + //ret = mt9t112_detect(client); +-- +1.6.6.1 + |