Skip to content

Commit 81e8d5a

Browse files
committed
ide: remove ide_setup_dma()
Export sff_dma_ops and then remove ide_setup_dma(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent cab7f8e commit 81e8d5a

6 files changed

Lines changed: 15 additions & 18 deletions

File tree

‎drivers/ide/arm/palm_bk3710.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,14 @@ static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
316316
static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif,
317317
const struct ide_port_info *d)
318318
{
319-
unsigned long base =
320-
hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;
321-
322319
printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name);
323320

324321
if (ide_allocate_dma_engine(hwif))
325322
return -1;
326323

327-
ide_setup_dma(hwif, base);
324+
hwif->dma_base = hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;
325+
326+
hwif->dma_ops = &sff_dma_ops;
328327

329328
return 0;
330329
}

‎drivers/ide/ide-dma.c‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ int ide_allocate_dma_engine(ide_hwif_t *hwif)
878878
}
879879
EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);
880880

881-
static const struct ide_dma_ops sff_dma_ops = {
881+
const struct ide_dma_ops sff_dma_ops = {
882882
.dma_host_set = ide_dma_host_set,
883883
.dma_setup = ide_dma_setup,
884884
.dma_exec_cmd = ide_dma_exec_cmd,
@@ -888,13 +888,5 @@ static const struct ide_dma_ops sff_dma_ops = {
888888
.dma_timeout = ide_dma_timeout,
889889
.dma_lost_irq = ide_dma_lost_irq,
890890
};
891-
892-
void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
893-
{
894-
hwif->dma_base = base;
895-
896-
hwif->dma_ops = &sff_dma_ops;
897-
}
898-
899-
EXPORT_SYMBOL_GPL(ide_setup_dma);
891+
EXPORT_SYMBOL_GPL(sff_dma_ops);
900892
#endif /* CONFIG_BLK_DEV_IDEDMA_SFF */

‎drivers/ide/pci/alim15x3.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,9 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif,
483483
if (ide_allocate_dma_engine(hwif))
484484
return -1;
485485

486-
ide_setup_dma(hwif, base);
486+
hwif->dma_base = base;
487+
488+
hwif->dma_ops = &sff_dma_ops;
487489

488490
return 0;
489491
}

‎drivers/ide/pci/hpt366.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,9 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif,
13461346
if (ide_allocate_dma_engine(hwif))
13471347
return -1;
13481348

1349-
ide_setup_dma(hwif, base);
1349+
hwif->dma_base = base;
1350+
1351+
hwif->dma_ops = &sff_dma_ops;
13501352

13511353
return 0;
13521354
}

‎drivers/ide/setup-pci.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
377377
if (ide_allocate_dma_engine(hwif))
378378
return -1;
379379

380-
ide_setup_dma(hwif, base);
380+
hwif->dma_base = base;
381+
382+
hwif->dma_ops = &sff_dma_ops;
381383
}
382384

383385
return 0;

‎include/linux/ide.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
10071007
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
10081008
int ide_pci_set_master(struct pci_dev *, const char *);
10091009
unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *);
1010+
extern const struct ide_dma_ops sff_dma_ops;
10101011
int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *);
10111012
#else
10121013
static inline int ide_hwif_setup_dma(ide_hwif_t *hwif,
@@ -1164,7 +1165,6 @@ void ide_destroy_dmatable(ide_drive_t *);
11641165
extern int ide_build_dmatable(ide_drive_t *, struct request *);
11651166
int ide_allocate_dma_engine(ide_hwif_t *);
11661167
void ide_release_dma_engine(ide_hwif_t *);
1167-
void ide_setup_dma(ide_hwif_t *, unsigned long);
11681168

11691169
void ide_dma_host_set(ide_drive_t *, int);
11701170
extern int ide_dma_setup(ide_drive_t *);

0 commit comments

Comments
 (0)