Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92396
b: refs/heads/master
c: 520ebe5
h: refs/heads/master
v: v3
  • Loading branch information
Tyler Trafford authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 7bf4c77 commit 3b0a2ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 491215d81049bfda749ebda007ecd3ae8bee19e3
refs/heads/master: 520ebe5f72ff450d7a73e8f669190254a5836093
11 changes: 4 additions & 7 deletions trunk/drivers/media/video/cx25840/cx25840-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ static int check_fw_load(struct i2c_client *client, int size)
return 0;
}

static int fw_write(struct i2c_client *client, u8 * data, int size)
static int fw_write(struct i2c_client *client, u8 *data, int size)
{
int sent;

if ((sent = i2c_master_send(client, data, size)) < size) {
if (i2c_master_send(client, data, size) < size) {
v4l_err(client, "firmware load i2c failure\n");
return -ENOSYS;
}
Expand All @@ -96,7 +94,7 @@ int cx25840_loadfw(struct i2c_client *client)
struct cx25840_state *state = i2c_get_clientdata(client);
const struct firmware *fw = NULL;
u8 buffer[4], *ptr;
int size, send, retval;
int size, retval;

if (state->is_cx23885)
firmware = FWFILE_CX23885;
Expand Down Expand Up @@ -124,8 +122,7 @@ int cx25840_loadfw(struct i2c_client *client)
while (size > 0) {
ptr[0] = 0x08;
ptr[1] = 0x02;
send = size > (FWSEND - 2) ? FWSEND : size + 2;
retval = fw_write(client, ptr, send);
retval = fw_write(client, ptr, min(FWSEND, size + 2));

if (retval < 0) {
release_firmware(fw);
Expand Down

0 comments on commit 3b0a2ca

Please sign in to comment.