LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 11/19] ide: remove ide_pci_device_t tables with only one entry
Date: Fri, 12 Jan 2007 05:27:16 +0100	[thread overview]
Message-ID: <20070112042716.28794.40732.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20070112042621.28794.6937.sendpatchset@localhost.localdomain>

[PATCH] ide: remove ide_pci_device_t tables with only one entry

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

---
 drivers/ide/pci/cy82c693.c |   21 +++++++++------------
 drivers/ide/pci/sgiioc4.c  |    7 ++-----
 2 files changed, 11 insertions(+), 17 deletions(-)

Index: a/drivers/ide/pci/cy82c693.c
===================================================================
--- a.orig/drivers/ide/pci/cy82c693.c
+++ a/drivers/ide/pci/cy82c693.c
@@ -478,21 +478,18 @@ static void __devinit init_iops_cy82c693
 	}
 }
 
-static ide_pci_device_t cy82c693_chipsets[] __devinitdata = {
-	{	/* 0 */
-		.name		= "CY82C693",
-		.init_chipset	= init_chipset_cy82c693,
-		.init_iops	= init_iops_cy82c693,
-		.init_hwif	= init_hwif_cy82c693,
-		.channels	= 1,
-		.autodma	= AUTODMA,
-		.bootable	= ON_BOARD,
-	}
+static ide_pci_device_t cy82c693_chipset __devinitdata = {
+	.name		= "CY82C693",
+	.init_chipset	= init_chipset_cy82c693,
+	.init_iops	= init_iops_cy82c693,
+	.init_hwif	= init_hwif_cy82c693,
+	.channels	= 1,
+	.autodma	= AUTODMA,
+	.bootable	= ON_BOARD,
 };
 
 static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-	ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
 	struct pci_dev *dev2;
 	int ret = -ENODEV;
 
@@ -501,7 +498,7 @@ static int __devinit cy82c693_init_one(s
         if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
 	    PCI_FUNC(dev->devfn) == 1) {
 		dev2 = pci_get_slot(dev->bus, dev->devfn + 1);
-		ret = ide_setup_pci_devices(dev, dev2, d);
+		ret = ide_setup_pci_devices(dev, dev2, &cy82c693_chipset);
 		/* We leak pci refs here but thats ok - we can't be unloaded */
 	}
 	return ret;
Index: a/drivers/ide/pci/sgiioc4.c
===================================================================
--- a.orig/drivers/ide/pci/sgiioc4.c
+++ a/drivers/ide/pci/sgiioc4.c
@@ -729,8 +729,7 @@ out:
 	return ret;
 }
 
-static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = {
-	{
+static ide_pci_device_t sgiioc4_chipset __devinitdata = {
 	 /* Channel 0 */
 	 .name = "SGIIOC4",
 	 .init_hwif = ide_init_sgiioc4,
@@ -739,7 +738,6 @@ static ide_pci_device_t sgiioc4_chipsets
 	 .autodma = AUTODMA,
 	 /* SGI IOC4 doesn't have enablebits. */
 	 .bootable = ON_BOARD,
-	}
 };
 
 int
@@ -751,8 +749,7 @@ ioc4_ide_attach_one(struct ioc4_driver_d
 	if (idd->idd_variant == IOC4_VARIANT_PCI_RT)
 		return 0;
 
-	return pci_init_sgiioc4(idd->idd_pdev,
-				&sgiioc4_chipsets[idd->idd_pci_id->driver_data]);
+	return pci_init_sgiioc4(idd->idd_pdev, &sgiioc4_chipset);
 }
 
 static struct ioc4_submodule ioc4_ide_submodule = {

  parent reply	other threads:[~2007-01-12  4:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12  4:26 [PATCH 2/19] ide: add it8213 driver Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 3/19] ide: it8213 driver update Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 4/19] ia64: add pci_get_legacy_ide_irq() Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 5/19] ide: add missing __init tags to IDE PCI host drivers Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 6/19] pdc202xx_old: remove dead code Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 7/19] au1xxx-ide: " Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 8/19] ide: remove write-only ide_pio_data_t.blacklisted Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 9/19] ide: remove write-only ide_hwif_t.no_dsc flag Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 10/19] trm290: remove redundant CONFIG_BLK_DEV_IDEDMA Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` Bartlomiej Zolnierkiewicz [this message]
2007-01-12  4:27 ` [PATCH 12/19] ide: remove ide_drive_t.usage Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 13/19] hpt366: remove redundant check from init_dma_hpt366() Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 14/19] cs5530: small cleanup Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 15/19] svwks: " Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 16/19] sis5513: sis5513_config_xfer_rate() cleanup Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 17/19] ide: unexport ide_set_xfer_rate() Bartlomiej Zolnierkiewicz
2007-01-12  4:28 ` [PATCH 18/19] ide: add ide_use_fast_pio() helper Bartlomiej Zolnierkiewicz
2007-01-12 10:08   ` Alan
2007-01-12 14:00     ` Bartlomiej Zolnierkiewicz
2007-01-12 14:30       ` Alan
2007-01-12 14:43         ` Bartlomiej Zolnierkiewicz
2007-01-12 15:16           ` Alan
2007-01-12 17:24             ` Bartlomiej Zolnierkiewicz
2007-01-12  4:28 ` [PATCH 19/19] ide: use PIO/MMIO operations directly where possible Bartlomiej Zolnierkiewicz
2007-01-12 10:06   ` Alan
2007-01-12 14:19     ` Bartlomiej Zolnierkiewicz
2007-06-21 17:16   ` Sergei Shtylyov
2007-06-21 18:19     ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070112042716.28794.40732.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 11/19] ide: remove ide_pci_device_t tables with only one entry' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).