aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-04-04 16:11:05 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:45:28 -0400
commit7e81d8254d4f00817b98588fce1afb448ccc14a9 (patch)
tree38cf1b08082d6b20d6e898467338c1694c589b88
parentc680dd603857d7218b84751e9f6f0654bbfbefa2 (diff)
V4L/DVB (5503): Sn9c102: declare constant byte sequences as static const
Makes sure they don't get copied onto the stack. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 028f173c1cce..c0e6c3bbe64d 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -499,7 +499,7 @@ static size_t sn9c102_sof_length(struct sn9c102_device* cam)
499static void* 499static void*
500sn9c102_find_sof_header(struct sn9c102_device* cam, void* mem, size_t len) 500sn9c102_find_sof_header(struct sn9c102_device* cam, void* mem, size_t len)
501{ 501{
502 const char marker[6] = {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96}; 502 static const char marker[6] = {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96};
503 const char *m = mem; 503 const char *m = mem;
504 size_t soflen = 0, i, j; 504 size_t soflen = 0, i, j;
505 505
@@ -544,7 +544,7 @@ sn9c102_find_sof_header(struct sn9c102_device* cam, void* mem, size_t len)
544static void* 544static void*
545sn9c102_find_eof_header(struct sn9c102_device* cam, void* mem, size_t len) 545sn9c102_find_eof_header(struct sn9c102_device* cam, void* mem, size_t len)
546{ 546{
547 char eof_header[4][4] = { 547 static const u8 eof_header[4][4] = {
548 {0x00, 0x00, 0x00, 0x00}, 548 {0x00, 0x00, 0x00, 0x00},
549 {0x40, 0x00, 0x00, 0x00}, 549 {0x40, 0x00, 0x00, 0x00},
550 {0x80, 0x00, 0x00, 0x00}, 550 {0x80, 0x00, 0x00, 0x00},
@@ -574,7 +574,7 @@ sn9c102_find_eof_header(struct sn9c102_device* cam, void* mem, size_t len)
574static void 574static void
575sn9c102_write_jpegheader(struct sn9c102_device* cam, struct sn9c102_frame_t* f) 575sn9c102_write_jpegheader(struct sn9c102_device* cam, struct sn9c102_frame_t* f)
576{ 576{
577 static u8 jpeg_header[589] = { 577 static const u8 jpeg_header[589] = {
578 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x84, 0x00, 0x06, 0x04, 0x05, 578 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x84, 0x00, 0x06, 0x04, 0x05,
579 0x06, 0x05, 0x04, 0x06, 0x06, 0x05, 0x06, 0x07, 0x07, 0x06, 579 0x06, 0x05, 0x04, 0x06, 0x06, 0x05, 0x06, 0x07, 0x07, 0x06,
580 0x08, 0x0a, 0x10, 0x0a, 0x0a, 0x09, 0x09, 0x0a, 0x14, 0x0e, 580 0x08, 0x0a, 0x10, 0x0a, 0x0a, 0x09, 0x09, 0x0a, 0x14, 0x0e,