]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.20.2/v4l-fix-cx25840-firmware-loading.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.20.2 / v4l-fix-cx25840-firmware-loading.patch
1 From stable-bounces@linux.kernel.org Sat Mar 3 06:37:50 2007
2 From: Hans Verkuil <hverkuil@xs4all.nl>
3 Date: Sat, 03 Mar 2007 09:36:11 -0500
4 Subject: V4L: fix cx25840 firmware loading
5 To: stable@kernel.org
6 Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>
7 Message-ID: <45E987DB.1070502@linuxtv.org>
8
9
10 From: Hans Verkuil <hverkuil@xs4all.nl>
11 Date: Thu, 15 Feb 2007 03:40:34 -0300
12 Subject: [PATCH] V4L: fix cx25840 firmware loading
13
14 Due to changes in the i2c handling in 2.6.20 this cx25840 bug surfaced,
15 causing the firmware load to fail for the ivtv driver. The correct
16 sequence is to first attach the i2c client, then use the client's
17 device to load the firmware.
18
19 (cherry picked from commit d55c7aec666658495e5b57a6b194c8c2a1ac255f)
20
21 Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
22 Acked-by: Mike Isely <isely@pobox.com>
23 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
24 Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
26
27 ---
28 drivers/media/video/cx25840/cx25840-core.c | 4 ++--
29 drivers/media/video/cx25840/cx25840-firmware.c | 2 +-
30 2 files changed, 3 insertions(+), 3 deletions(-)
31
32 --- linux-2.6.20.1.orig/drivers/media/video/cx25840/cx25840-core.c
33 +++ linux-2.6.20.1/drivers/media/video/cx25840/cx25840-core.c
34 @@ -907,13 +907,13 @@ static int cx25840_detect_client(struct
35 state->vbi_line_offset = 8;
36 state->id = id;
37
38 + i2c_attach_client(client);
39 +
40 if (state->is_cx25836)
41 cx25836_initialize(client);
42 else
43 cx25840_initialize(client, 1);
44
45 - i2c_attach_client(client);
46 -
47 return 0;
48 }
49
50 --- linux-2.6.20.1.orig/drivers/media/video/cx25840/cx25840-firmware.c
51 +++ linux-2.6.20.1/drivers/media/video/cx25840/cx25840-firmware.c
52 @@ -37,7 +37,7 @@
53 */
54 #define FWSEND 48
55
56 -#define FWDEV(x) &((x)->adapter->dev)
57 +#define FWDEV(x) &((x)->dev)
58
59 static char *firmware = FWFILE;
60