summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-09-30 15:28:50 +0000
committerThierry Vignaud <tv@mandriva.org>2009-09-30 15:28:50 +0000
commit0f7768e9f3c5d48dac307c26e2321a94715201c2 (patch)
tree4654bef400ce52736383394bb1a9ed9b66450c4e
parent635c5616a6b6e9e39ca54e3b8ffdf1488d0568a3 (diff)
downloadldetect-0f7768e9f3c5d48dac307c26e2321a94715201c2.tar
ldetect-0f7768e9f3c5d48dac307c26e2321a94715201c2.tar.gz
ldetect-0f7768e9f3c5d48dac307c26e2321a94715201c2.tar.bz2
ldetect-0f7768e9f3c5d48dac307c26e2321a94715201c2.tar.xz
ldetect-0f7768e9f3c5d48dac307c26e2321a94715201c2.zip
(pci_probe) no need to allocate that much space on the stack
-rw-r--r--pci.c4
1 files 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);