aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cs5520.c
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/ata/pata_cs5520.c
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/ata/pata_cs5520.c')
-rw-r--r--drivers/ata/pata_cs5520.c20
1 files changed, 1 insertions, 19 deletions
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
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,