Commit 04a3f5b7 authored by Brian Norris's avatar Brian Norris Committed by Jeff Garzik

libata: use pci_get_drvdata() helper

Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 1645bf1b
...@@ -6287,8 +6287,7 @@ void ata_host_detach(struct ata_host *host) ...@@ -6287,8 +6287,7 @@ void ata_host_detach(struct ata_host *host)
*/ */
void ata_pci_remove_one(struct pci_dev *pdev) void ata_pci_remove_one(struct pci_dev *pdev)
{ {
struct device *dev = &pdev->dev; struct ata_host *host = pci_get_drvdata(pdev);
struct ata_host *host = dev_get_drvdata(dev);
ata_host_detach(host); ata_host_detach(host);
} }
...@@ -6357,7 +6356,7 @@ int ata_pci_device_do_resume(struct pci_dev *pdev) ...@@ -6357,7 +6356,7 @@ int ata_pci_device_do_resume(struct pci_dev *pdev)
int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
int rc = 0; int rc = 0;
rc = ata_host_suspend(host, mesg); rc = ata_host_suspend(host, mesg);
...@@ -6371,7 +6370,7 @@ int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) ...@@ -6371,7 +6370,7 @@ int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
int ata_pci_device_resume(struct pci_dev *pdev) int ata_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
int rc; int rc;
rc = ata_pci_device_do_resume(pdev); rc = ata_pci_device_do_resume(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment