diff options
| author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-10-07 11:24:22 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2011-10-07 23:46:20 -0400 |
| commit | d86619211ed3cdf4f6abff984774b65314aba0fe (patch) | |
| tree | c66486b89e9c5266bb613703cdc956c5fe871cad /drivers/ata/sata_mv.c | |
| parent | c00a4c9d247a3a24190d2f27ab9b23424d8b082c (diff) | |
sata_mv: use {platform|pci}_get_drvdata()
The driver uses dev_get_drvdata() to get to the driver data for the
platform and PCI devices, while the corresponding wrappers exists for
them -- in one case it even declares an otherwise unneeded variable
to do that. Switch to using the {platform|pci}_get_drvdata() instead.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_mv.c')
| -rw-r--r-- | drivers/ata/sata_mv.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 647cb3abf4d..0b8b8b488ee 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
| @@ -4113,8 +4113,7 @@ err: | |||
| 4113 | */ | 4113 | */ |
| 4114 | static int __devexit mv_platform_remove(struct platform_device *pdev) | 4114 | static int __devexit mv_platform_remove(struct platform_device *pdev) |
| 4115 | { | 4115 | { |
| 4116 | struct device *dev = &pdev->dev; | 4116 | struct ata_host *host = platform_get_drvdata(pdev); |
| 4117 | struct ata_host *host = dev_get_drvdata(dev); | ||
| 4118 | #if defined(CONFIG_HAVE_CLK) | 4117 | #if defined(CONFIG_HAVE_CLK) |
| 4119 | struct mv_host_priv *hpriv = host->private_data; | 4118 | struct mv_host_priv *hpriv = host->private_data; |
| 4120 | #endif | 4119 | #endif |
| @@ -4132,7 +4131,7 @@ static int __devexit mv_platform_remove(struct platform_device *pdev) | |||
| 4132 | #ifdef CONFIG_PM | 4131 | #ifdef CONFIG_PM |
| 4133 | static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) | 4132 | static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) |
| 4134 | { | 4133 | { |
| 4135 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 4134 | struct ata_host *host = platform_get_drvdata(pdev); |
| 4136 | if (host) | 4135 | if (host) |
| 4137 | return ata_host_suspend(host, state); | 4136 | return ata_host_suspend(host, state); |
| 4138 | else | 4137 | else |
| @@ -4141,7 +4140,7 @@ static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) | |||
| 4141 | 4140 | ||
| 4142 | static int mv_platform_resume(struct platform_device *pdev) | 4141 | static int mv_platform_resume(struct platform_device *pdev) |
| 4143 | { | 4142 | { |
| 4144 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 4143 | struct ata_host *host = platform_get_drvdata(pdev); |
| 4145 | int ret; | 4144 | int ret; |
| 4146 | 4145 | ||
| 4147 | if (host) { | 4146 | if (host) { |
| @@ -4356,7 +4355,7 @@ static int mv_pci_init_one(struct pci_dev *pdev, | |||
| 4356 | #ifdef CONFIG_PM | 4355 | #ifdef CONFIG_PM |
| 4357 | static int mv_pci_device_resume(struct pci_dev *pdev) | 4356 | static int mv_pci_device_resume(struct pci_dev *pdev) |
| 4358 | { | 4357 | { |
| 4359 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 4358 | struct ata_host *host = pci_get_drvdata(pdev); |
| 4360 | int rc; | 4359 | int rc; |
| 4361 | 4360 | ||
| 4362 | rc = ata_pci_device_do_resume(pdev); | 4361 | rc = ata_pci_device_do_resume(pdev); |
