diff options
author | Brian Norris <computersforpeace@gmail.com> | 2012-12-03 13:34:41 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-12-03 13:53:34 -0500 |
commit | 04a3f5b7d2961a05b428abc75b30e2dc85f88ac6 (patch) | |
tree | 7b6df153aa2abd2a6b790cd681e64d102ff7fa3b /drivers/ata | |
parent | 1645bf1b51e5788a18cb6af7cfbb221ee17a6e8b (diff) |
libata: use pci_get_drvdata() helper
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8e3f4a90c088..47d59616fe3d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -6287,8 +6287,7 @@ void ata_host_detach(struct ata_host *host) | |||
6287 | */ | 6287 | */ |
6288 | void ata_pci_remove_one(struct pci_dev *pdev) | 6288 | void ata_pci_remove_one(struct pci_dev *pdev) |
6289 | { | 6289 | { |
6290 | struct device *dev = &pdev->dev; | 6290 | struct ata_host *host = pci_get_drvdata(pdev); |
6291 | struct ata_host *host = dev_get_drvdata(dev); | ||
6292 | 6291 | ||
6293 | ata_host_detach(host); | 6292 | ata_host_detach(host); |
6294 | } | 6293 | } |
@@ -6357,7 +6356,7 @@ int ata_pci_device_do_resume(struct pci_dev *pdev) | |||
6357 | 6356 | ||
6358 | int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | 6357 | int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) |
6359 | { | 6358 | { |
6360 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 6359 | struct ata_host *host = pci_get_drvdata(pdev); |
6361 | int rc = 0; | 6360 | int rc = 0; |
6362 | 6361 | ||
6363 | rc = ata_host_suspend(host, mesg); | 6362 | rc = ata_host_suspend(host, mesg); |
@@ -6371,7 +6370,7 @@ int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | |||
6371 | 6370 | ||
6372 | int ata_pci_device_resume(struct pci_dev *pdev) | 6371 | int ata_pci_device_resume(struct pci_dev *pdev) |
6373 | { | 6372 | { |
6374 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 6373 | struct ata_host *host = pci_get_drvdata(pdev); |
6375 | int rc; | 6374 | int rc; |
6376 | 6375 | ||
6377 | rc = ata_pci_device_do_resume(pdev); | 6376 | rc = ata_pci_device_do_resume(pdev); |