ata: use pci_get_drvdata()

Use the wrapper function for getting the driver data using pci_dev
instead of using dev_get_drvdata() with &pdev->dev, so we can directly
pass a struct pci_dev.  This is a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Jingoo Han 2013-06-03 14:05:36 +09:00 committed by Tejun Heo
parent f6e984e636
commit 0a86e1c857
30 changed files with 37 additions and 37 deletions

View File

@ -128,7 +128,7 @@ static struct pci_driver acard_ahci_pci_driver = {
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) static int acard_ahci_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);
struct ahci_host_priv *hpriv = host->private_data; struct ahci_host_priv *hpriv = host->private_data;
void __iomem *mmio = hpriv->mmio; void __iomem *mmio = hpriv->mmio;
u32 ctl; u32 ctl;
@ -156,7 +156,7 @@ static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg
static int acard_ahci_pci_device_resume(struct pci_dev *pdev) static int acard_ahci_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);

View File

@ -616,7 +616,7 @@ static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) static int ahci_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);
struct ahci_host_priv *hpriv = host->private_data; struct ahci_host_priv *hpriv = host->private_data;
void __iomem *mmio = hpriv->mmio; void __iomem *mmio = hpriv->mmio;
u32 ctl; u32 ctl;
@ -644,7 +644,7 @@ static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
static int ahci_pci_device_resume(struct pci_dev *pdev) static int ahci_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);

View File

@ -988,7 +988,7 @@ static int piix_broken_suspend(void)
static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) static int piix_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);
unsigned long flags; unsigned long flags;
int rc = 0; int rc = 0;
@ -1023,7 +1023,7 @@ static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
static int piix_pci_device_resume(struct pci_dev *pdev) static int piix_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
unsigned long flags; unsigned long flags;
int rc; int rc;
@ -1736,7 +1736,7 @@ static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
static void piix_remove_one(struct pci_dev *pdev) static void piix_remove_one(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
struct piix_host_priv *hpriv = host->private_data; struct piix_host_priv *hpriv = host->private_data;
pci_write_config_dword(pdev, PIIX_IOCFG, hpriv->saved_iocfg); pci_write_config_dword(pdev, PIIX_IOCFG, hpriv->saved_iocfg);

View File

@ -592,7 +592,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ali_reinit_one(struct pci_dev *pdev) static int ali_reinit_one(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);

View File

@ -578,7 +578,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int amd_reinit_one(struct pci_dev *pdev) static int amd_reinit_one(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);

View File

@ -426,7 +426,7 @@ static const struct pci_device_id artop_pci_tbl[] = {
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int atp8xx_reinit_one(struct pci_dev *pdev) static int atp8xx_reinit_one(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);

View File

@ -534,7 +534,7 @@ err_out:
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int atp867x_reinit_one(struct pci_dev *pdev) static int atp867x_reinit_one(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);

View File

@ -235,7 +235,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int cmd640_reinit_one(struct pci_dev *pdev) static int cmd640_reinit_one(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);

View File

@ -491,7 +491,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int cmd64x_reinit_one(struct pci_dev *pdev) static int cmd64x_reinit_one(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);

View File

@ -241,7 +241,7 @@ static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
static int cs5520_reinit_one(struct pci_dev *pdev) static int cs5520_reinit_one(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
u8 pcicfg; u8 pcicfg;
int rc; int rc;
@ -269,7 +269,7 @@ static int cs5520_reinit_one(struct pci_dev *pdev)
static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) static int cs5520_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);

View File

@ -330,7 +330,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int cs5530_reinit_one(struct pci_dev *pdev) static int cs5530_reinit_one(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);

View File

@ -390,7 +390,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int hpt36x_reinit_one(struct pci_dev *dev) static int hpt36x_reinit_one(struct pci_dev *dev)
{ {
struct ata_host *host = dev_get_drvdata(&dev->dev); struct ata_host *host = pci_get_drvdata(dev);
int rc; int rc;
rc = ata_pci_device_do_resume(dev); rc = ata_pci_device_do_resume(dev);

View File

@ -253,7 +253,7 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int hpt3x3_reinit_one(struct pci_dev *dev) static int hpt3x3_reinit_one(struct pci_dev *dev)
{ {
struct ata_host *host = dev_get_drvdata(&dev->dev); struct ata_host *host = pci_get_drvdata(dev);
int rc; int rc;
rc = ata_pci_device_do_resume(dev); rc = ata_pci_device_do_resume(dev);

View File

@ -939,7 +939,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int it821x_reinit_one(struct pci_dev *pdev) static int it821x_reinit_one(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);

View File

@ -1311,7 +1311,7 @@ static int pata_macio_pci_attach(struct pci_dev *pdev,
static void pata_macio_pci_detach(struct pci_dev *pdev) static void pata_macio_pci_detach(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
ata_host_detach(host); ata_host_detach(host);
} }
@ -1320,14 +1320,14 @@ static void pata_macio_pci_detach(struct pci_dev *pdev)
static int pata_macio_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) static int pata_macio_pci_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);
return pata_macio_do_suspend(host->private_data, mesg); return pata_macio_do_suspend(host->private_data, mesg);
} }
static int pata_macio_pci_resume(struct pci_dev *pdev) static int pata_macio_pci_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
return pata_macio_do_resume(host->private_data); return pata_macio_do_resume(host->private_data);
} }

View File

@ -157,7 +157,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
static int ninja32_reinit_one(struct pci_dev *pdev) static int ninja32_reinit_one(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);

View File

@ -389,7 +389,7 @@ static const struct pci_device_id ns87415_pci_tbl[] = {
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ns87415_reinit_one(struct pci_dev *pdev) static int ns87415_reinit_one(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);

View File

@ -765,7 +765,7 @@ static int pdc2027x_init_one(struct pci_dev *pdev,
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int pdc2027x_reinit_one(struct pci_dev *pdev) static int pdc2027x_reinit_one(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
unsigned int board_idx; unsigned int board_idx;
int rc; int rc;

View File

@ -364,7 +364,7 @@ static int rdc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
static void rdc_remove_one(struct pci_dev *pdev) static void rdc_remove_one(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
struct rdc_host_priv *hpriv = host->private_data; struct rdc_host_priv *hpriv = host->private_data;
pci_write_config_dword(pdev, 0x54, hpriv->saved_iocfg); pci_write_config_dword(pdev, 0x54, hpriv->saved_iocfg);

View File

@ -105,7 +105,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int rz1000_reinit_one(struct pci_dev *pdev) static int rz1000_reinit_one(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);

View File

@ -440,7 +440,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int serverworks_reinit_one(struct pci_dev *pdev) static int serverworks_reinit_one(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);

View File

@ -407,7 +407,7 @@ use_ioports:
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sil680_reinit_one(struct pci_dev *pdev) static int sil680_reinit_one(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
int try_mmio, rc; int try_mmio, rc;
rc = ata_pci_device_do_resume(pdev); rc = ata_pci_device_do_resume(pdev);

View File

@ -873,7 +873,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sis_reinit_one(struct pci_dev *pdev) static int sis_reinit_one(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);

View File

@ -341,7 +341,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sl82c105_reinit_one(struct pci_dev *pdev) static int sl82c105_reinit_one(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);

View File

@ -211,7 +211,7 @@ static const struct pci_device_id triflex[] = {
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) static int triflex_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);

View File

@ -673,7 +673,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
static int via_reinit_one(struct pci_dev *pdev) static int via_reinit_one(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);

View File

@ -776,7 +776,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int inic_pci_device_resume(struct pci_dev *pdev) static int inic_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
struct inic_host_priv *hpriv = host->private_data; struct inic_host_priv *hpriv = host->private_data;
int rc; int rc;

View File

@ -2435,7 +2435,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int nv_pci_device_resume(struct pci_dev *pdev) static int nv_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
struct nv_host_priv *hpriv = host->private_data; struct nv_host_priv *hpriv = host->private_data;
int rc; int rc;

View File

@ -805,7 +805,7 @@ static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sil_pci_device_resume(struct pci_dev *pdev) static int sil_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);

View File

@ -1353,7 +1353,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sil24_pci_device_resume(struct pci_dev *pdev) static int sil24_pci_device_resume(struct pci_dev *pdev)
{ {
struct ata_host *host = dev_get_drvdata(&pdev->dev); struct ata_host *host = pci_get_drvdata(pdev);
void __iomem *host_base = host->iomap[SIL24_HOST_BAR]; void __iomem *host_base = host->iomap[SIL24_HOST_BAR];
int rc; int rc;