diff options
author | Igor M. Liplianin <liplianin@me.by> | 2011-02-01 19:40:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 20:32:20 -0300 |
commit | caa687c805332a384afd292e2b20e25a6282ed66 (patch) | |
tree | 5775537c914cd2e076d74fafe08e0afc97464ddb | |
parent | 2a66bf370c2aca617fad8dd8fe6c276d6bb1b44c (diff) |
[media] ds3000: loading firmware in bigger chunks
Decrease firmware loading time. Before it is ~4000 i2c calls,
now it is ~256 i2c calls to load ds3000 firmware.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/frontends/ds3000.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 41af75adc575..b2f0f4e8e512 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb/frontends/ds3000.c @@ -305,7 +305,7 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg, struct i2c_msg msg; u8 *buf; - buf = kmalloc(3, GFP_KERNEL); + buf = kmalloc(33, GFP_KERNEL); if (buf == NULL) { printk(KERN_ERR "Unable to kmalloc\n"); ret = -ENOMEM; @@ -317,10 +317,10 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg, msg.addr = state->config->demod_address; msg.flags = 0; msg.buf = buf; - msg.len = 3; + msg.len = 33; - for (i = 0; i < len; i += 2) { - memcpy(buf + 1, data + i, 2); + for (i = 0; i < len; i += 32) { + memcpy(buf + 1, data + i, 32); dprintk("%s: write reg 0x%02x, len = %d\n", __func__, reg, len); |