aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:19 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:19 -0400
commit5add22241752a3c689bea2a9d0e71c2a5909ed8a (patch)
tree65292ecc97c4fab189bd552a849a15925a96c183 /drivers
parent0d1bad216c43bcee84cc24d1ed003c19134d2645 (diff)
ide: remove ide_hwif_request_regions()
Remove no longer used ide_hwif_request_regions() and hwif_request_region(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 694d997ce50f..3d989c298ff4 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -227,56 +227,6 @@ static int ide_system_bus_speed(void)
227 return pci_dev_present(pci_default) ? 33 : 50; 227 return pci_dev_present(pci_default) ? 33 : 50;
228} 228}
229 229
230static struct resource* hwif_request_region(ide_hwif_t *hwif,
231 unsigned long addr, int num)
232{
233 struct resource *res = request_region(addr, num, hwif->name);
234
235 if (!res)
236 printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
237 hwif->name, addr, addr+num-1);
238 return res;
239}
240
241/**
242 * ide_hwif_request_regions - request resources for IDE
243 * @hwif: interface to use
244 *
245 * Requests all the needed resources for an interface.
246 * Right now core IDE code does this work which is deeply wrong.
247 * MMIO leaves it to the controller driver,
248 * PIO will migrate this way over time.
249 */
250
251int ide_hwif_request_regions(ide_hwif_t *hwif)
252{
253 unsigned long addr;
254
255 if (hwif->mmio)
256 return 0;
257
258 addr = hwif->io_ports[IDE_CONTROL_OFFSET];
259
260 if (addr && !hwif_request_region(hwif, addr, 1))
261 goto control_region_busy;
262
263 addr = hwif->io_ports[IDE_DATA_OFFSET];
264 BUG_ON((addr | 7) != hwif->io_ports[IDE_STATUS_OFFSET]);
265
266 if (!hwif_request_region(hwif, addr, 8))
267 goto data_region_busy;
268
269 return 0;
270
271data_region_busy:
272 addr = hwif->io_ports[IDE_CONTROL_OFFSET];
273 if (addr)
274 release_region(addr, 1);
275control_region_busy:
276 /* If any errors are return, we drop the hwif interface. */
277 return -EBUSY;
278}
279
280void ide_remove_port_from_hwgroup(ide_hwif_t *hwif) 230void ide_remove_port_from_hwgroup(ide_hwif_t *hwif)
281{ 231{
282 ide_hwgroup_t *hwgroup = hwif->hwgroup; 232 ide_hwgroup_t *hwgroup = hwif->hwgroup;