diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-29 07:47:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:45:13 -0400 |
commit | 66623a0419da2bae2efab40a46018faacce2e3aa (patch) | |
tree | 63794f2a1282e466ded2ace2315e623a25e8ad03 /drivers/media/video/cx88 | |
parent | 53c4e9551c2930767fcdaa54323616c32ed6e9c6 (diff) |
V4L/DVB (5480): Fix cx88_print_irqbits calls to use ARRAY_SIZE
cx88_print_irqbits were expecting a string pointer with 32 bytes. Better
to pass the string size and use ARRAY_SIZE on its calls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-alsa.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 8 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 2 |
5 files changed, 11 insertions, 8 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index e4355fdc3b6..5a8f18f8ddb 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -232,7 +232,8 @@ static void cx8801_aud_irq(snd_cx88_card_t *chip) | |||
232 | cx_write(MO_AUD_INTSTAT, status); | 232 | cx_write(MO_AUD_INTSTAT, status); |
233 | if (debug > 1 || (status & mask & ~0xff)) | 233 | if (debug > 1 || (status & mask & ~0xff)) |
234 | cx88_print_irqbits(core->name, "irq aud", | 234 | cx88_print_irqbits(core->name, "irq aud", |
235 | cx88_aud_irqs, status, mask); | 235 | cx88_aud_irqs, ARRAY_SIZE(cx88_aud_irqs), |
236 | status, mask); | ||
236 | /* risc op code error */ | 237 | /* risc op code error */ |
237 | if (status & (1 << 16)) { | 238 | if (status & (1 << 16)) { |
238 | printk(KERN_WARNING "%s/0: audio risc op code error\n",core->name); | 239 | printk(KERN_WARNING "%s/0: audio risc op code error\n",core->name); |
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index d86813be56d..f31ec96924b 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -489,12 +489,12 @@ static char *cx88_pci_irqs[32] = { | |||
489 | }; | 489 | }; |
490 | 490 | ||
491 | void cx88_print_irqbits(char *name, char *tag, char **strings, | 491 | void cx88_print_irqbits(char *name, char *tag, char **strings, |
492 | u32 bits, u32 mask) | 492 | int len, u32 bits, u32 mask) |
493 | { | 493 | { |
494 | unsigned int i; | 494 | unsigned int i; |
495 | 495 | ||
496 | printk(KERN_DEBUG "%s: %s [0x%x]", name, tag, bits); | 496 | printk(KERN_DEBUG "%s: %s [0x%x]", name, tag, bits); |
497 | for (i = 0; i < 32; i++) { | 497 | for (i = 0; i < len; i++) { |
498 | if (!(bits & (1 << i))) | 498 | if (!(bits & (1 << i))) |
499 | continue; | 499 | continue; |
500 | if (strings[i]) | 500 | if (strings[i]) |
@@ -520,8 +520,8 @@ int cx88_core_irq(struct cx88_core *core, u32 status) | |||
520 | } | 520 | } |
521 | if (!handled) | 521 | if (!handled) |
522 | cx88_print_irqbits(core->name, "irq pci", | 522 | cx88_print_irqbits(core->name, "irq pci", |
523 | cx88_pci_irqs, status, | 523 | cx88_pci_irqs, ARRAY_SIZE(cx88_pci_irqs), |
524 | core->pci_irqmask); | 524 | status, core->pci_irqmask); |
525 | return handled; | 525 | return handled; |
526 | } | 526 | } |
527 | 527 | ||
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index db98f1fd396..def939d435d 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -366,7 +366,8 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev) | |||
366 | 366 | ||
367 | if (debug || (status & mask & ~0xff)) | 367 | if (debug || (status & mask & ~0xff)) |
368 | cx88_print_irqbits(core->name, "irq mpeg ", | 368 | cx88_print_irqbits(core->name, "irq mpeg ", |
369 | cx88_mpeg_irqs, status, mask); | 369 | cx88_mpeg_irqs, ARRAY_SIZE(cx88_mpeg_irqs), |
370 | status, mask); | ||
370 | 371 | ||
371 | /* risc op code error */ | 372 | /* risc op code error */ |
372 | if (status & (1 << 16)) { | 373 | if (status & (1 << 16)) { |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index bdfe2af7012..5ae5c02644e 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1555,7 +1555,8 @@ static void cx8800_vid_irq(struct cx8800_dev *dev) | |||
1555 | cx_write(MO_VID_INTSTAT, status); | 1555 | cx_write(MO_VID_INTSTAT, status); |
1556 | if (irq_debug || (status & mask & ~0xff)) | 1556 | if (irq_debug || (status & mask & ~0xff)) |
1557 | cx88_print_irqbits(core->name, "irq vid", | 1557 | cx88_print_irqbits(core->name, "irq vid", |
1558 | cx88_vid_irqs, status, mask); | 1558 | cx88_vid_irqs, ARRAY_SIZE(cx88_vid_irqs), |
1559 | status, mask); | ||
1559 | 1560 | ||
1560 | /* risc op code error */ | 1561 | /* risc op code error */ |
1561 | if (status & (1 << 16)) { | 1562 | if (status & (1 << 16)) { |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index d16ed93080e..738d4f20c58 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -512,7 +512,7 @@ struct cx8802_dev { | |||
512 | /* cx88-core.c */ | 512 | /* cx88-core.c */ |
513 | 513 | ||
514 | extern void cx88_print_irqbits(char *name, char *tag, char **strings, | 514 | extern void cx88_print_irqbits(char *name, char *tag, char **strings, |
515 | u32 bits, u32 mask); | 515 | int len, u32 bits, u32 mask); |
516 | 516 | ||
517 | extern int cx88_core_irq(struct cx88_core *core, u32 status); | 517 | extern int cx88_core_irq(struct cx88_core *core, u32 status); |
518 | extern void cx88_wakeup(struct cx88_core *core, | 518 | extern void cx88_wakeup(struct cx88_core *core, |