[PATCH 04/18] ide: remove ide_setup_dma()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>, <linux-kernel@...>
Date: Friday, June 20, 2008 - 5:33 pm

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>
---
 drivers/ide/arm/palm_bk3710.c |    7 +++----
 drivers/ide/ide-dma.c         |   12 ++----------
 drivers/ide/pci/alim15x3.c    |    4 +++-
 drivers/ide/pci/hpt366.c      |    4 +++-
 drivers/ide/setup-pci.c       |    4 +++-
 include/linux/ide.h           |    2 +-
 6 files changed, 15 insertions(+), 18 deletions(-)

Index: b/drivers/ide/arm/palm_bk3710.c
===================================================================
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -318,15 +318,14 @@ static u8 __devinit palm_bk3710_cable_de
 static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif,
 					  const struct ide_port_info *d)
 {
-	unsigned long base =
-		hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;
-
 	printk(KERN_INFO "    %s: MMIO-DMA\n", hwif->name);
 
 	if (ide_allocate_dma_engine(hwif))
 		return -1;
 
-	ide_setup_dma(hwif, base);
+	hwif->dma_base = hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET;
+
+	hwif->dma_ops = &sff_dma_ops;
 
 	return 0;
 }
Index: b/drivers/ide/ide-dma.c
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -878,7 +878,7 @@ int ide_allocate_dma_engine(ide_hwif_t *
 }
 EXPORT_SYMBOL_GPL(ide_allocate_dma_engine);
 
-static const struct ide_dma_ops sff_dma_ops = {
+const struct ide_dma_ops sff_dma_ops = {
 	.dma_host_set		= ide_dma_host_set,
 	.dma_setup		= ide_dma_setup,
 	.dma_exec_cmd		= ide_dma_exec_cmd,
@@ -888,13 +888,5 @@ static const struct ide_dma_ops sff_dma_
 	.dma_timeout		= ide_dma_timeout,
 	.dma_lost_irq		= ide_dma_lost_irq,
 };
-
-void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
-{
-	hwif->dma_base = base;
-
-	hwif->dma_ops = &sff_dma_ops;
-}
-
-EXPORT_SYMBOL_GPL(ide_setup_dma);
+EXPORT_SYMBOL_GPL(sff_dma_ops);
 #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */
Index: b/drivers/ide/pci/alim15x3.c
===================================================================
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -483,7 +483,9 @@ static int __devinit init_dma_ali15x3(id
 	if (ide_allocate_dma_engine(hwif))
 		return -1;
 
-	ide_setup_dma(hwif, base);
+	hwif->dma_base = base;
+
+	hwif->dma_ops = &sff_dma_ops;
 
 	return 0;
 }
Index: b/drivers/ide/pci/hpt366.c
===================================================================
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1346,7 +1346,9 @@ static int __devinit init_dma_hpt366(ide
 	if (ide_allocate_dma_engine(hwif))
 		return -1;
 
-	ide_setup_dma(hwif, base);
+	hwif->dma_base = base;
+
+	hwif->dma_ops = &sff_dma_ops;
 
 	return 0;
 }
Index: b/drivers/ide/setup-pci.c
===================================================================
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -376,7 +376,9 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif,
 		if (ide_allocate_dma_engine(hwif))
 			return -1;
 
-		ide_setup_dma(hwif, base);
+		hwif->dma_base = base;
+
+		hwif->dma_ops = &sff_dma_ops;
 	}
 
 	return 0;
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -993,6 +993,7 @@ void ide_setup_pci_noise(struct pci_dev 
 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
 int ide_pci_set_master(struct pci_dev *, const char *);
 unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *);
+extern const struct ide_dma_ops sff_dma_ops;
 int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *);
 #else
 static inline int ide_hwif_setup_dma(ide_hwif_t *hwif,
@@ -1150,7 +1151,6 @@ void ide_destroy_dmatable(ide_drive_t *)
 extern int ide_build_dmatable(ide_drive_t *, struct request *);
 int ide_allocate_dma_engine(ide_hwif_t *);
 void ide_release_dma_engine(ide_hwif_t *);
-void ide_setup_dma(ide_hwif_t *, unsigned long);
 
 void ide_dma_host_set(ide_drive_t *, int);
 extern int ide_dma_setup(ide_drive_t *);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:33 pm)
Re: [PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Sergei Shtylyov, (Wed Sep 3, 9:19 am)
Re: [PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Bartlomiej Zolnierkiewicz..., (Wed Sep 3, 2:13 pm)
Re: [PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Sergei Shtylyov, (Sun Sep 7, 2:15 pm)
Re: [PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Bartlomiej Zolnierkiewicz..., (Sun Sep 7, 3:23 pm)
Re: [PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Sergei Shtylyov, (Sun Sep 7, 6:26 pm)
Re: [PATCH 01/18] ide: add -&gt;read_sff_dma_status method, Sergei Shtylyov, (Sun Sep 7, 2:49 pm)
[PATCH 18/18] ide: remove -&gt;INB, -&gt;OUTB and -&gt;OUTBSYNC methods, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:35 pm)
[PATCH 17/18] ide: add ide_read_bcount_and_ireason() helper, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:35 pm)
[PATCH 16/18] ide: add ide_read_ireason() helper, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:35 pm)
[PATCH 15/18] ide: add ide_read_device() helper, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:35 pm)
[PATCH 14/18] ide: use -&gt;tf_read in ide_read_error(), Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 13/18] ide: use -&gt;tf_load in SELECT_DRIVE(), Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 12/18] ide: use -&gt;tf_load in actual_try_to_identify(), Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
Re: [PATCH 12/18] ide: use -&gt;tf_load in actual_try_to_ide..., Bartlomiej Zolnierkiewicz..., (Sat Jun 21, 3:10 pm)
[PATCH 11/18] ide: use -&gt;tf_load in ide_config_drive_speed(), Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 10/18] ide: change order of register access in ide_co..., Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 09/18] ide: add -&gt;set_irq method, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
Re: [PATCH 09/18] ide: add -&gt;set_irq method, Sergei Shtylyov, (Wed Oct 15, 8:20 am)
Re: [PATCH 09/18] ide: add -&gt;set_irq method, Bartlomiej Zolnierkiewicz..., (Wed Oct 15, 2:22 pm)
Re: [PATCH 09/18] ide: add -&gt;set_irq method, Sergei Shtylyov, (Wed Oct 15, 5:22 pm)
[PATCH 08/18] ide: add -&gt;read_altstatus method, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 07/18] ide: add -&gt;read_status method, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 06/18] ide: add -&gt;exec_command method, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:34 pm)
[PATCH 05/18] ide: factor out simplex handling from ide_pci_..., Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:33 pm)
[PATCH 04/18] ide: remove ide_setup_dma(), Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:33 pm)
Re: [PATCH 04/18] ide: remove ide_setup_dma(), Sergei Shtylyov, (Thu Aug 21, 1:16 pm)
Re: [PATCH 04/18] ide: remove ide_setup_dma(), Sergei Shtylyov, (Thu Aug 21, 1:56 pm)
Re: [PATCH 04/18] ide: remove ide_setup_dma(), Sergei Shtylyov, (Fri Jun 20, 6:03 pm)
Re: [PATCH 04/18] ide: remove ide_setup_dma(), Bartlomiej Zolnierkiewicz..., (Sat Jun 21, 3:06 pm)
Re: [PATCH 04/18] ide: remove ide_setup_dma(), Sergei Shtylyov, (Sat Jun 21, 3:29 pm)
[PATCH 03/18] ide: remove -&gt;dma_{status,command} fields f..., Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:33 pm)
[PATCH 02/18] ide: use I/O ops directly in ide-dma.c, Bartlomiej Zolnierkiewicz..., (Fri Jun 20, 5:33 pm)
Re: [PATCH 02/18] ide: use I/O ops directly in ide-dma.c, Sergei Shtylyov, (Mon Sep 8, 11:49 am)