]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers/pci/pci_rom.c: fix compile warning under 64bit mode
authorMinghuan Lian <Minghuan.Lian@freescale.com>
Thu, 22 Jan 2015 05:21:55 +0000 (13:21 +0800)
committerTom Rini <trini@ti.com>
Fri, 30 Jan 2015 14:19:16 +0000 (09:19 -0500)
Fix this:
drivers/pci/pci_rom.c:95:15: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
rom_header = (struct pci_rom_header *)rom_address;

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
drivers/pci/pci_rom.c

index eb7659177b42310656486d3c911379fe4e151ed1..5729a152e5bb00ed759dfe90bd7750f10b7e20b7 100644 (file)
@@ -98,7 +98,7 @@ static int pci_rom_probe(pci_dev_t dev, uint class,
                               rom_address | PCI_ROM_ADDRESS_ENABLE);
 #endif
        debug("Option ROM address %x\n", rom_address);
-       rom_header = (struct pci_rom_header *)rom_address;
+       rom_header = (struct pci_rom_header *)(unsigned long)rom_address;
 
        debug("PCI expansion ROM, signature %#04x, INIT size %#04x, data ptr %#04x\n",
              le16_to_cpu(rom_header->signature),