diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-08-01 11:25:41 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-08-01 11:25:41 +0000 |
commit | d98cf5bed93e48f4cb3bdc5219a03207cd01c3ce (patch) | |
tree | 072e22c0b4436607b18af31205c4fc50b3b8911e /src/devices/pci_rom.c | |
parent | 8533606db71ef9c4f77983eaea1b2f27c9bb7baf (diff) | |
download | coreboot-d98cf5bed93e48f4cb3bdc5219a03207cd01c3ce.tar.xz |
fix typos and warnings in the device tree code (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3441 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pci_rom.c')
-rw-r--r-- | src/devices/pci_rom.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index d47a7e3f51..1b7e4bffa8 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -26,6 +26,7 @@ #include <device/pci.h> #include <device/pci_ids.h> #include <device/pci_ops.h> +#include <string.h> struct rom_header * pci_rom_probe(struct device *dev) { @@ -62,7 +63,7 @@ struct rom_header * pci_rom_probe(struct device *dev) return NULL; } - rom_data = (unsigned char *) rom_header + le32_to_cpu(rom_header->data); + rom_data = (struct pci_data *) ((void *)rom_header + le32_to_cpu(rom_header->data)); printk_spew("PCI ROM Image, Vendor %04x, Device %04x,\n", rom_data->vendor, rom_data->device); if (dev->vendor != rom_data->vendor || dev->device != rom_data->device) { @@ -95,8 +96,8 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); do { - rom_header = (unsigned char *) rom_header + image_size; // get next image - rom_data = (unsigned char *) rom_header + le32_to_cpu(rom_header->data); + rom_header = (struct rom_header *)((void *) rom_header + image_size); // get next image + rom_data = (struct pci_data *)((void *) rom_header + le32_to_cpu(rom_header->data)); image_size = le32_to_cpu(rom_data->ilen) * 512; } while ((rom_data->type!=0) && (rom_data->indicator!=0)); // make sure we got x86 version @@ -111,7 +112,7 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade #endif printk_debug("copying VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n", rom_header, PCI_VGA_RAM_IMAGE_START, rom_size); - memcpy(PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); + memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START); } else { printk_debug("copying non-VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n", |