aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-11 17:12:35 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:47 -0400
commit2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed (patch)
tree79262af301c2386c2c391942991742653bc7935e /drivers
parentb06ce3e51e3df4394a584c234f11240b1c6f8d5b (diff)
[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')
-rw-r--r--drivers/ata/libata-core.c2
-rw-r--r--drivers/ata/libata-eh.c1
-rw-r--r--drivers/ata/pata_cs5520.c20
3 files changed, 3 insertions, 20 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ce8ccb434aff..b05384a8c326 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)
7007 */ 7007 */
7008void ata_pci_remove_one(struct pci_dev *pdev) 7008void ata_pci_remove_one(struct pci_dev *pdev)
7009{ 7009{
7010 struct device *dev = pci_dev_to_dev(pdev); 7010 struct device *dev = &pdev->dev;
7011 struct ata_host *host = dev_get_drvdata(dev); 7011 struct ata_host *host = dev_get_drvdata(dev);
7012 7012
7013 ata_host_detach(host); 7013 ata_host_detach(host);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 5a2b2af4d0c1..2eaa39fc65d0 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -33,6 +33,7 @@
33 */ 33 */
34 34
35#include <linux/kernel.h> 35#include <linux/kernel.h>
36#include <linux/pci.h>
36#include <scsi/scsi.h> 37#include <scsi/scsi.h>
37#include <scsi/scsi_host.h> 38#include <scsi/scsi_host.h>
38#include <scsi/scsi_eh.h> 39#include <scsi/scsi_eh.h>
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index ff1eb84c7d22..33f7f0843f4f 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
299 return ata_host_register(host, &cs5520_sht); 299 return ata_host_register(host, &cs5520_sht);
300} 300}
301 301
302/**
303 * cs5520_remove_one - device unload
304 * @pdev: PCI device being removed
305 *
306 * Handle an unplug/unload event for a PCI device. Unload the
307 * PCI driver but do not use the default handler as we manage
308 * resources ourself and *MUST NOT* disable the device as it has
309 * other functions.
310 */
311
312static void __devexit cs5520_remove_one(struct pci_dev *pdev)
313{
314 struct device *dev = pci_dev_to_dev(pdev);
315 struct ata_host *host = dev_get_drvdata(dev);
316
317 ata_host_detach(host);
318}
319
320#ifdef CONFIG_PM 302#ifdef CONFIG_PM
321/** 303/**
322 * cs5520_reinit_one - device resume 304 * cs5520_reinit_one - device resume
@@ -373,7 +355,7 @@ static struct pci_driver cs5520_pci_driver = {
373 .name = DRV_NAME, 355 .name = DRV_NAME,
374 .id_table = pata_cs5520, 356 .id_table = pata_cs5520,
375 .probe = cs5520_init_one, 357 .probe = cs5520_init_one,
376 .remove = cs5520_remove_one, 358 .remove = ata_pci_remove_one,
377#ifdef CONFIG_PM 359#ifdef CONFIG_PM
378 .suspend = cs5520_pci_device_suspend, 360 .suspend = cs5520_pci_device_suspend,
379 .resume = cs5520_reinit_one, 361 .resume = cs5520_reinit_one,