ide: remove ->cds field from ide_hwif_t (take 2)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Saturday, April 26, 2008 - 5:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e59c2...
Commit:     5e59c236846df444860ffc8b852117f9ff65c101
Parent:     0a79acd40d1ee8b6bf217a519eee422ed7e6da6b
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Sat Apr 26 22:25:20 2008 +0200
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Sat Apr 26 22:25:20 2008 +0200

    ide: remove ->cds field from ide_hwif_t (take 2)
    
    * Use hwif->name instead of cds->name in ide_allocate_dma_engine().
    
    * Use pci_name(dev) instead of cds->name in init_dma_pdc202xx().
    
    * Remove no longer needed ->cds field from ide_hwif_t.
    
    v2:
    
    * scc_pata.c also needs to be updated now (noticed by Stephen Rothwell).
    
    There should be no functional changes caused by this patch.
    
    Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
    Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-dma.c          |    2 +-
 drivers/ide/pci/pdc202xx_old.c |    5 +++--
 drivers/ide/pci/scc_pata.c     |    1 -
 drivers/ide/setup-pci.c        |    1 -
 include/linux/ide.h            |    2 --
 5 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 31a7113..b38a9df 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -833,7 +833,7 @@ static int ide_allocate_dma_engine(ide_hwif_t *hwif)
 		return 0;
 
 	printk(KERN_ERR "%s: -- Error, unable to allocate DMA table.\n",
-	       hwif->cds->name);
+			hwif->name);
 
 	return 1;
 }
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 06617ab..421a1f8 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -288,6 +288,7 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
 
 static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase)
 {
+	struct pci_dev *dev = to_pci_dev(hwif->dev);
 	u8 udma_speed_flag = 0, primary_mode = 0, secondary_mode = 0;
 
 	if (hwif->channel) {
@@ -300,14 +301,14 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase)
 	secondary_mode	= inb(dmabase | 0x1b);
 	printk(KERN_INFO "%s: (U)DMA Burst Bit %sABLED " \
 		"Primary %s Mode " \
-		"Secondary %s Mode.\n", hwif->cds->name,
+		"Secondary %s Mode.\n", pci_name(dev),
 		(udma_speed_flag & 1) ? "EN" : "DIS",
 		(primary_mode & 1) ? "MASTER" : "PCI",
 		(secondary_mode & 1) ? "MASTER" : "PCI" );
 
 	if (!(udma_speed_flag & 1)) {
 		printk(KERN_INFO "%s: FORCING BURST BIT 0x%02x->0x%02x ",
-			hwif->cds->name, udma_speed_flag,
+			pci_name(dev), udma_speed_flag,
 			(udma_speed_flag|1));
 		outb(udma_speed_flag | 1, dmabase | 0x1f);
 		printk("%sACTIVE\n", (inb(dmabase | 0x1f) & 1) ? "" : "IN");
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index e7f8ebc..c30b0c4 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -541,7 +541,6 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
 	hw.chipset = ide_pci;
 	ide_init_port_hw(hwif, &hw);
 	hwif->dev = &dev->dev;
-	hwif->cds = d;
 
 	idx[0] = hwif->index;
 
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 8812eaa..2699764 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -322,7 +322,6 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev,
 	ide_init_port_hw(hwif, &hw);
 
 	hwif->dev = &dev->dev;
-	hwif->cds = d;
 
 	return hwif;
 }
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 171f805..989fe78 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -446,8 +446,6 @@ typedef struct hwif_s {
 
 	struct device *dev;
 
-	const struct ide_port_info *cds;	/* chipset device struct */
-
 	ide_ack_intr_t *ack_intr;
 
 	void (*rw_disk)(ide_drive_t *, struct request *);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide: remove ->cds field from ide_hwif_t (take 2), Linux Kernel Mailing List..., (Sat Apr 26, 5:59 pm)