summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx.h
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2013-03-03 22:37:42 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-04 23:23:27 +0400
commita217968f919b0574ef59054430d8908aebcf0a35 (patch)
tree4675b3228a1a783ba686f5c9bc64b303c10f805f /drivers/media/usb/em28xx/em28xx.h
parentd832c5b28aff3c9aadfbde3002b640058eee6294 (diff)
downloadlinux-a217968f919b0574ef59054430d8908aebcf0a35.tar.xz
[media] em28xx: do not store eeprom content permanently
We currently reserve an array of 256 bytes for the eeprom content in the device struct. For eeproms with 16 bit address width it might even be necessary to increase the buffer size further. Having such a big chunk of memory reserved even if the device has no eeprom and keeping it after it has already been processed seems to be a waste of memory. Change the code to allocate + free the eeprom memory dynamically. This also makes it possible to handle different dataset sizes depending on what is stored/found in the eeprom. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx.h')
-rw-r--r--drivers/media/usb/em28xx/em28xx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index 139dfe54a057..77f600dc0067 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -562,7 +562,7 @@ struct em28xx {
/* resources in use */
unsigned int resources;
- unsigned char eedata[256];
+ u8 *eedata; /* currently always 256 bytes */
/* Isoc control struct */
struct em28xx_dmaqueue vidq;