diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-11 17:12:35 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:47 -0400 |
commit | 2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed (patch) | |
tree | 79262af301c2386c2c391942991742653bc7935e /drivers/ata | |
parent | b06ce3e51e3df4394a584c234f11240b1c6f8d5b (diff) | |
download | kernel-crypto-2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed.tar.gz kernel-crypto-2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed.tar.xz kernel-crypto-2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed.zip |
[libata] struct pci_dev related cleanups
* remove pointless pci_dev_to_dev() wrapper. Just directly reference
the embedded struct device like everyone else does.
* pata_cs5520: delete cs5520_remove_one(), it was a duplicate of
ata_pci_remove_one()
* linux/libata.h: don't bother including linux/pci.h, we don't need it.
Simply declare 'struct pci_dev' and assume interested parties will
include the header, as they should be doing anyway.
* linux/libata.h: consolidate all CONFIG_PCI declarations into a
single location in the header.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 2 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 1 | ||||
-rw-r--r-- | drivers/ata/pata_cs5520.c | 20 |
3 files changed, 3 insertions, 20 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ce8ccb434af..b05384a8c32 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -7007,7 +7007,7 @@ void ata_std_ports(struct ata_ioports *ioaddr) */ void ata_pci_remove_one(struct pci_dev *pdev) { - struct device *dev = pci_dev_to_dev(pdev); + struct device *dev = &pdev->dev; struct ata_host *host = dev_get_drvdata(dev); ata_host_detach(host); diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 5a2b2af4d0c..2eaa39fc65d 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -33,6 +33,7 @@ */ #include <linux/kernel.h> +#include <linux/pci.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h> #include <scsi/scsi_eh.h> diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index ff1eb84c7d2..33f7f0843f4 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c @@ -299,24 +299,6 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi return ata_host_register(host, &cs5520_sht); } -/** - * cs5520_remove_one - device unload - * @pdev: PCI device being removed - * - * Handle an unplug/unload event for a PCI device. Unload the - * PCI driver but do not use the default handler as we manage - * resources ourself and *MUST NOT* disable the device as it has - * other functions. - */ - -static void __devexit cs5520_remove_one(struct pci_dev *pdev) -{ - struct device *dev = pci_dev_to_dev(pdev); - struct ata_host *host = dev_get_drvdata(dev); - - ata_host_detach(host); -} - #ifdef CONFIG_PM /** * cs5520_reinit_one - device resume @@ -373,7 +355,7 @@ static struct pci_driver cs5520_pci_driver = { .name = DRV_NAME, .id_table = pata_cs5520, .probe = cs5520_init_one, - .remove = cs5520_remove_one, + .remove = ata_pci_remove_one, #ifdef CONFIG_PM .suspend = cs5520_pci_device_suspend, .resume = cs5520_reinit_one, |