Commit d55c7aec authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (5255): Fix cx25840 firmware loading.

Due to changes in the i2c handling in 2.6.20 this cx25840 bug surfaced,
causing the firmware load to fail for the ivtv driver. The correct
sequence is to first attach the i2c client, then use the client's
device to load the firmware.
Acked-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2ff7354f
...@@ -903,13 +903,13 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, ...@@ -903,13 +903,13 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address,
state->vbi_line_offset = 8; state->vbi_line_offset = 8;
state->id = id; state->id = id;
i2c_attach_client(client);
if (state->is_cx25836) if (state->is_cx25836)
cx25836_initialize(client); cx25836_initialize(client);
else else
cx25840_initialize(client, 1); cx25840_initialize(client, 1);
i2c_attach_client(client);
return 0; return 0;
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
*/ */
#define FWSEND 48 #define FWSEND 48
#define FWDEV(x) &((x)->adapter->dev) #define FWDEV(x) &((x)->dev)
static char *firmware = FWFILE; static char *firmware = FWFILE;
......
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