diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-16 22:38:50 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-22 13:31:53 -0400 |
commit | 7990681ad8215977b27ac855520720193de2c98f (patch) | |
tree | eca542d2f4b0c5c6f6c704eb681285d564f112a3 /drivers/pci/rom.c | |
parent | 282e1d655fe7c7c2e6b0dd8166c4c6b7c2a1219b (diff) |
PCI: Remove unused, commented-out, code
This removes unused code that was already commented out.
Tested-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'drivers/pci/rom.c')
-rw-r--r-- | drivers/pci/rom.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 48ebdb237f3f..0b3037ab8b93 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -167,44 +167,6 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) | |||
167 | return rom; | 167 | return rom; |
168 | } | 168 | } |
169 | 169 | ||
170 | #if 0 | ||
171 | /** | ||
172 | * pci_map_rom_copy - map a PCI ROM to kernel space, create a copy | ||
173 | * @pdev: pointer to pci device struct | ||
174 | * @size: pointer to receive size of pci window over ROM | ||
175 | * | ||
176 | * Return: kernel virtual pointer to image of ROM | ||
177 | * | ||
178 | * Map a PCI ROM into kernel space. If ROM is boot video ROM, | ||
179 | * the shadow BIOS copy will be returned instead of the | ||
180 | * actual ROM. | ||
181 | */ | ||
182 | void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size) | ||
183 | { | ||
184 | struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; | ||
185 | void __iomem *rom; | ||
186 | |||
187 | rom = pci_map_rom(pdev, size); | ||
188 | if (!rom) | ||
189 | return NULL; | ||
190 | |||
191 | if (res->flags & (IORESOURCE_ROM_COPY | IORESOURCE_ROM_SHADOW | | ||
192 | IORESOURCE_ROM_BIOS_COPY)) | ||
193 | return rom; | ||
194 | |||
195 | res->start = (unsigned long)kmalloc(*size, GFP_KERNEL); | ||
196 | if (!res->start) | ||
197 | return rom; | ||
198 | |||
199 | res->end = res->start + *size; | ||
200 | memcpy_fromio((void*)(unsigned long)res->start, rom, *size); | ||
201 | pci_unmap_rom(pdev, rom); | ||
202 | res->flags |= IORESOURCE_ROM_COPY; | ||
203 | |||
204 | return (void __iomem *)(unsigned long)res->start; | ||
205 | } | ||
206 | #endif /* 0 */ | ||
207 | |||
208 | /** | 170 | /** |
209 | * pci_unmap_rom - unmap the ROM from kernel space | 171 | * pci_unmap_rom - unmap the ROM from kernel space |
210 | * @pdev: pointer to pci device struct | 172 | * @pdev: pointer to pci device struct |
@@ -226,27 +188,6 @@ void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom) | |||
226 | pci_disable_rom(pdev); | 188 | pci_disable_rom(pdev); |
227 | } | 189 | } |
228 | 190 | ||
229 | #if 0 | ||
230 | /** | ||
231 | * pci_remove_rom - disable the ROM and remove its sysfs attribute | ||
232 | * @pdev: pointer to pci device struct | ||
233 | * | ||
234 | * Remove the rom file in sysfs and disable ROM decoding. | ||
235 | */ | ||
236 | void pci_remove_rom(struct pci_dev *pdev) | ||
237 | { | ||
238 | struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; | ||
239 | |||
240 | if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) | ||
241 | sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); | ||
242 | if (!(res->flags & (IORESOURCE_ROM_ENABLE | | ||
243 | IORESOURCE_ROM_SHADOW | | ||
244 | IORESOURCE_ROM_BIOS_COPY | | ||
245 | IORESOURCE_ROM_COPY))) | ||
246 | pci_disable_rom(pdev); | ||
247 | } | ||
248 | #endif /* 0 */ | ||
249 | |||
250 | /** | 191 | /** |
251 | * pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy | 192 | * pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy |
252 | * @pdev: pointer to pci device struct | 193 | * @pdev: pointer to pci device struct |