diff options
author | tvboxspy <tvboxspy@gmail.com> | 2011-09-11 18:30:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-21 15:55:30 -0400 |
commit | 810fda9bccc6513856346a9a714cf951d569cd35 (patch) | |
tree | e90f57b1a8b11c2a284dc77698272656f4cdc8f9 /drivers/media/dvb/dvb-usb | |
parent | 95c21c4158cc8b5a2920ccbe989b17b6f955d976 (diff) |
[media] [2/2,ver,1.90] DM04/QQBOX Reduce USB buffer size
Reduced unused buffer size to 64.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/lmedm04.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c index 5fdeed1d3c61..b9228240f5ce 100644 --- a/drivers/media/dvb/dvb-usb/lmedm04.c +++ b/drivers/media/dvb/dvb-usb/lmedm04.c | |||
@@ -162,7 +162,7 @@ static int lme2510_usb_talk(struct dvb_usb_device *d, | |||
162 | int ret = 0; | 162 | int ret = 0; |
163 | 163 | ||
164 | if (st->usb_buffer == NULL) { | 164 | if (st->usb_buffer == NULL) { |
165 | st->usb_buffer = kmalloc(512, GFP_KERNEL); | 165 | st->usb_buffer = kmalloc(64, GFP_KERNEL); |
166 | if (st->usb_buffer == NULL) { | 166 | if (st->usb_buffer == NULL) { |
167 | info("MEM Error no memory"); | 167 | info("MEM Error no memory"); |
168 | return -ENOMEM; | 168 | return -ENOMEM; |
@@ -175,8 +175,8 @@ static int lme2510_usb_talk(struct dvb_usb_device *d, | |||
175 | if (ret < 0) | 175 | if (ret < 0) |
176 | return -EAGAIN; | 176 | return -EAGAIN; |
177 | 177 | ||
178 | /* the read/write capped at 512 */ | 178 | /* the read/write capped at 64 */ |
179 | memcpy(buff, wbuf, (wlen > 512) ? 512 : wlen); | 179 | memcpy(buff, wbuf, (wlen < 64) ? wlen : 64); |
180 | 180 | ||
181 | ret |= usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, 0x01)); | 181 | ret |= usb_clear_halt(d->udev, usb_sndbulkpipe(d->udev, 0x01)); |
182 | 182 | ||
@@ -186,8 +186,8 @@ static int lme2510_usb_talk(struct dvb_usb_device *d, | |||
186 | 186 | ||
187 | ret |= usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, 0x01)); | 187 | ret |= usb_clear_halt(d->udev, usb_rcvbulkpipe(d->udev, 0x01)); |
188 | 188 | ||
189 | ret |= lme2510_bulk_read(d->udev, buff, (rlen > 512) ? | 189 | ret |= lme2510_bulk_read(d->udev, buff, (rlen < 64) ? |
190 | 512 : rlen , 0x01); | 190 | rlen : 64 , 0x01); |
191 | 191 | ||
192 | if (rlen > 0) | 192 | if (rlen > 0) |
193 | memcpy(rbuf, buff, rlen); | 193 | memcpy(rbuf, buff, rlen); |
@@ -580,7 +580,7 @@ static int lme2510_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], | |||
580 | { | 580 | { |
581 | struct dvb_usb_device *d = i2c_get_adapdata(adap); | 581 | struct dvb_usb_device *d = i2c_get_adapdata(adap); |
582 | struct lme2510_state *st = d->priv; | 582 | struct lme2510_state *st = d->priv; |
583 | static u8 obuf[64], ibuf[512]; | 583 | static u8 obuf[64], ibuf[64]; |
584 | int i, read, read_o; | 584 | int i, read, read_o; |
585 | u16 len; | 585 | u16 len; |
586 | u8 gate = st->i2c_gate; | 586 | u8 gate = st->i2c_gate; |
@@ -621,7 +621,7 @@ static int lme2510_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], | |||
621 | len = msg[i].len+3; | 621 | len = msg[i].len+3; |
622 | } | 622 | } |
623 | 623 | ||
624 | if (lme2510_msg(d, obuf, len, ibuf, 512) < 0) { | 624 | if (lme2510_msg(d, obuf, len, ibuf, 64) < 0) { |
625 | deb_info(1, "i2c transfer failed."); | 625 | deb_info(1, "i2c transfer failed."); |
626 | return -EAGAIN; | 626 | return -EAGAIN; |
627 | } | 627 | } |
@@ -1312,5 +1312,5 @@ module_exit(lme2510_module_exit); | |||
1312 | 1312 | ||
1313 | MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>"); | 1313 | MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>"); |
1314 | MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0"); | 1314 | MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0"); |
1315 | MODULE_VERSION("1.89"); | 1315 | MODULE_VERSION("1.90"); |
1316 | MODULE_LICENSE("GPL"); | 1316 | MODULE_LICENSE("GPL"); |