From 0f7768e9f3c5d48dac307c26e2321a94715201c2 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 30 Sep 2009 15:28:50 +0000 Subject: (pci_probe) no need to allocate that much space on the stack --- pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pci.c b/pci.c index 476feae..2b25097 100644 --- a/pci.c +++ b/pci.c @@ -29,7 +29,7 @@ static void __attribute__((noreturn)) error_and_die(char *msg, ...) } extern struct pciusb_entries pci_probe(void) { - u8 buf[BUF_SIZE]; + u8 buf[CONFIG_SPACE_ZIZE]; struct pciusb_entries r; static struct pci_access *pacc; @@ -55,7 +55,7 @@ extern struct pciusb_entries pci_probe(void) { struct pciusb_entry *e = &r.entries[r.nb]; unsigned char class_prog = 0; - memset(buf, 0, BUF_SIZE); // make sure not to retrieve values from previous devices + memset(buf, 0, CONFIG_SPACE_ZIZE); // make sure not to retrieve values from previous devices pci_setup_cache(dev, (u8*)buf, CONFIG_SPACE_ZIZE); pci_read_block(dev, 0, buf, CONFIG_SPACE_ZIZE); pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_CAPS | PCI_FILL_EXT_CAPS); -- cgit v1.2.1