aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-03-29 08:47:04 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 15:45:13 -0300
commit66623a0419da2bae2efab40a46018faacce2e3aa (patch)
tree63794f2a1282e466ded2ace2315e623a25e8ad03 /drivers/media/video/cx88/cx88-core.c
parent53c4e9551c2930767fcdaa54323616c32ed6e9c6 (diff)
downloadkernel_samsung_crespo-66623a0419da2bae2efab40a46018faacce2e3aa.zip
kernel_samsung_crespo-66623a0419da2bae2efab40a46018faacce2e3aa.tar.gz
kernel_samsung_crespo-66623a0419da2bae2efab40a46018faacce2e3aa.tar.bz2
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/cx88-core.c')
-rw-r--r--drivers/media/video/cx88/cx88-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index d86813b..f31ec96 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] = {
};
void cx88_print_irqbits(char *name, char *tag, char **strings,
- u32 bits, u32 mask)
+ int len, u32 bits, u32 mask)
{
unsigned int i;
printk(KERN_DEBUG "%s: %s [0x%x]", name, tag, bits);
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < len; i++) {
if (!(bits & (1 << i)))
continue;
if (strings[i])
@@ -520,8 +520,8 @@ int cx88_core_irq(struct cx88_core *core, u32 status)
}
if (!handled)
cx88_print_irqbits(core->name, "irq pci",
- cx88_pci_irqs, status,
- core->pci_irqmask);
+ cx88_pci_irqs, ARRAY_SIZE(cx88_pci_irqs),
+ status, core->pci_irqmask);
return handled;
}