aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/rom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/rom.c')
-rw-r--r--drivers/pci/rom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index 598a115cd00e..cbb69cf41311 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -80,8 +80,8 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)
80 } else { 80 } else {
81 if (res->flags & IORESOURCE_ROM_COPY) { 81 if (res->flags & IORESOURCE_ROM_COPY) {
82 *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); 82 *size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
83 return (void __iomem *)pci_resource_start(pdev, 83 return (void __iomem *)(unsigned long)
84 PCI_ROM_RESOURCE); 84 pci_resource_start(pdev, PCI_ROM_RESOURCE);
85 } else { 85 } else {
86 /* assign the ROM an address if it doesn't have one */ 86 /* assign the ROM an address if it doesn't have one */
87 if (res->parent == NULL && 87 if (res->parent == NULL &&
@@ -170,11 +170,11 @@ void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size)
170 return rom; 170 return rom;
171 171
172 res->end = res->start + *size; 172 res->end = res->start + *size;
173 memcpy_fromio((void*)res->start, rom, *size); 173 memcpy_fromio((void*)(unsigned long)res->start, rom, *size);
174 pci_unmap_rom(pdev, rom); 174 pci_unmap_rom(pdev, rom);
175 res->flags |= IORESOURCE_ROM_COPY; 175 res->flags |= IORESOURCE_ROM_COPY;
176 176
177 return (void __iomem *)res->start; 177 return (void __iomem *)(unsigned long)res->start;
178} 178}
179 179
180/** 180/**
@@ -227,7 +227,7 @@ void pci_cleanup_rom(struct pci_dev *pdev)
227{ 227{
228 struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; 228 struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];
229 if (res->flags & IORESOURCE_ROM_COPY) { 229 if (res->flags & IORESOURCE_ROM_COPY) {
230 kfree((void*)res->start); 230 kfree((void*)(unsigned long)res->start);
231 res->flags &= ~IORESOURCE_ROM_COPY; 231 res->flags &= ~IORESOURCE_ROM_COPY;
232 res->start = 0; 232 res->start = 0;
233 res->end = 0; 233 res->end = 0;