Skip to content

Commit

Permalink
edac: Rename the parent dev to pdev
Browse files Browse the repository at this point in the history
As EDAC doesn't use struct device itself, it created a parent dev
pointer called as "pdev".  Now that we'll be converting it to use
struct device, instead of struct devsys, this needs to be fixed.

No functional changes.

Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Mark Gross <mark.gross@intel.com>
Cc: Jason Uhlenkott <juhlenko@akamai.com>
Cc: Tim Small <tim@buttersideup.com>
Cc: Ranganathan Desikan <ravi@jetztechnologies.com>
Cc: "Arvind R." <arvino55@gmail.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Egor Martovetsky <egor@pasemi.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Joe Perches <joe@perches.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Niklas Söderlund" <niklas.soderlund@ericsson.com>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jun 11, 2012
1 parent 53f2d02 commit fd68750
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2601,7 +2601,7 @@ static int amd64_init_one_instance(struct pci_dev *F2)
goto err_siblings;

mci->pvt_info = pvt;
mci->dev = &pvt->F2->dev;
mci->pdev = &pvt->F2->dev;

setup_mci_misc_attrs(mci, fam_type);

Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/amd76x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void amd76x_get_error_info(struct mem_ctl_info *mci,
{
struct pci_dev *pdev;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);
pci_read_config_dword(pdev, AMD76X_ECC_MODE_STATUS,
&info->ecc_mode_status);

Expand Down Expand Up @@ -257,7 +257,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
return -ENOMEM;

debugf0("%s(): mci = %p\n", __func__, mci);
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_RDDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
mci->edac_cap = ems_mode ?
Expand Down
12 changes: 6 additions & 6 deletions drivers/edac/cell_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static void cell_edac_count_ce(struct mem_ctl_info *mci, int chan, u64 ar)
struct csrow_info *csrow = &mci->csrows[0];
unsigned long address, pfn, offset, syndrome;

dev_dbg(mci->dev, "ECC CE err on node %d, channel %d, ar = 0x%016llx\n",
dev_dbg(mci->pdev, "ECC CE err on node %d, channel %d, ar = 0x%016llx\n",
priv->node, chan, ar);

/* Address decoding is likely a bit bogus, to dbl check */
Expand All @@ -59,7 +59,7 @@ static void cell_edac_count_ue(struct mem_ctl_info *mci, int chan, u64 ar)
struct csrow_info *csrow = &mci->csrows[0];
unsigned long address, pfn, offset;

dev_dbg(mci->dev, "ECC UE err on node %d, channel %d, ar = 0x%016llx\n",
dev_dbg(mci->pdev, "ECC UE err on node %d, channel %d, ar = 0x%016llx\n",
priv->node, chan, ar);

/* Address decoding is likely a bit bogus, to dbl check */
Expand All @@ -83,7 +83,7 @@ static void cell_edac_check(struct mem_ctl_info *mci)
fir = in_be64(&priv->regs->mic_fir);
#ifdef DEBUG
if (fir != priv->prev_fir) {
dev_dbg(mci->dev, "fir change : 0x%016lx\n", fir);
dev_dbg(mci->pdev, "fir change : 0x%016lx\n", fir);
priv->prev_fir = fir;
}
#endif
Expand Down Expand Up @@ -119,7 +119,7 @@ static void cell_edac_check(struct mem_ctl_info *mci)
mb(); /* sync up */
#ifdef DEBUG
fir = in_be64(&priv->regs->mic_fir);
dev_dbg(mci->dev, "fir clear : 0x%016lx\n", fir);
dev_dbg(mci->pdev, "fir clear : 0x%016lx\n", fir);
#endif
}
}
Expand Down Expand Up @@ -155,7 +155,7 @@ static void __devinit cell_edac_init_csrows(struct mem_ctl_info *mci)
dimm->edac_mode = EDAC_SECDED;
dimm->nr_pages = nr_pages / csrow->nr_channels;
}
dev_dbg(mci->dev,
dev_dbg(mci->pdev,
"Initialized on node %d, chanmask=0x%x,"
" first_page=0x%lx, nr_pages=0x%x\n",
priv->node, priv->chanmask,
Expand Down Expand Up @@ -212,7 +212,7 @@ static int __devinit cell_edac_probe(struct platform_device *pdev)
priv->regs = regs;
priv->node = pdev->id;
priv->chanmask = chanmask;
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_XDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_EC | EDAC_FLAG_SECDED;
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/cpc925_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ static int __devinit cpc925_probe(struct platform_device *pdev)
pdata->edac_idx = edac_mc_idx++;
pdata->name = pdev->name;

mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
platform_set_drvdata(pdev, mci);
mci->dev_name = dev_name(&pdev->dev);
mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR;
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/e752x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
/* FIXME - what if different memory types are in different csrows? */
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = E752X_REVISION;
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;

debugf3("%s(): init pvt\n", __func__);
pvt = (struct e752x_pvt *)mci->pvt_info;
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/e7xxx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
/* FIXME - what if different memory types are in different csrows? */
mci->mod_name = EDAC_MOD_STR;
mci->mod_ver = E7XXX_REVISION;
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
debugf3("%s(): init pvt\n", __func__);
pvt = (struct e7xxx_pvt *)mci->pvt_info;
pvt->dev_info = &e7xxx_devs[dev_idx];
Expand Down
8 changes: 4 additions & 4 deletions drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static void edac_mc_dump_mci(struct mem_ctl_info *mci)
mci->nr_csrows, mci->csrows);
debugf3("\tmci->nr_dimms = %d, dimms = %p\n",
mci->tot_dimms, mci->dimms);
debugf3("\tdev = %p\n", mci->dev);
debugf3("\tdev = %p\n", mci->pdev);
debugf3("\tmod_name:ctl_name = %s:%s\n", mci->mod_name, mci->ctl_name);
debugf3("\tpvt_info = %p\n\n", mci->pvt_info);
}
Expand Down Expand Up @@ -428,7 +428,7 @@ struct mem_ctl_info *find_mci_by_dev(struct device *dev)
list_for_each(item, &mc_devices) {
mci = list_entry(item, struct mem_ctl_info, link);

if (mci->dev == dev)
if (mci->pdev == dev)
return mci;
}

Expand Down Expand Up @@ -580,7 +580,7 @@ static int add_mc_to_global_list(struct mem_ctl_info *mci)

insert_before = &mc_devices;

p = find_mci_by_dev(mci->dev);
p = find_mci_by_dev(mci->pdev);
if (unlikely(p != NULL))
goto fail0;

Expand All @@ -602,7 +602,7 @@ static int add_mc_to_global_list(struct mem_ctl_info *mci)

fail0:
edac_printk(KERN_WARNING, EDAC_MC,
"%s (%s) %s %s already assigned %d\n", dev_name(p->dev),
"%s (%s) %s %s already assigned %d\n", dev_name(p->pdev),
edac_dev_name(mci), p->mod_name, p->ctl_name, p->mc_idx);
return 1;

Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/edac_mc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
INIT_LIST_HEAD(&mci->grp_kobj_list);

/* create a symlink for the device */
err = sysfs_create_link(kobj_mci, &mci->dev->kobj,
err = sysfs_create_link(kobj_mci, &mci->pdev->kobj,
EDAC_DEVICE_SYMLINK);
if (err) {
debugf1("%s() failure to create symlink\n", __func__);
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/i3000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static void i3000_get_error_info(struct mem_ctl_info *mci,
{
struct pci_dev *pdev;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);

/*
* This is a mess because there is no atomic way to read all the
Expand Down Expand Up @@ -368,7 +368,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)

debugf3("MC: %s(): init mci\n", __func__);

mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_DDR2;

mci->edac_ctl_cap = EDAC_FLAG_SECDED;
Expand Down
6 changes: 3 additions & 3 deletions drivers/edac/i3200_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void i3200_clear_error_info(struct mem_ctl_info *mci)
{
struct pci_dev *pdev;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);

/*
* Clear any error bits.
Expand All @@ -176,7 +176,7 @@ static void i3200_get_and_clear_error_info(struct mem_ctl_info *mci,
struct i3200_priv *priv = mci->pvt_info;
void __iomem *window = priv->window;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);

/*
* This is a mess because there is no atomic way to read all the
Expand Down Expand Up @@ -354,7 +354,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)

debugf3("MC: %s(): init mci\n", __func__);

mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_DDR2;

mci->edac_ctl_cap = EDAC_FLAG_SECDED;
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/i5000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
kobject_get(&mci->edac_mci_kobj);
debugf0("MC: %s: %s(): mci = %p\n", __FILE__, __func__, mci);

mci->dev = &pdev->dev; /* record ptr to the generic device */
mci->pdev = &pdev->dev; /* record ptr to the generic device */

pvt = mci->pvt_info;
pvt->system_address = pdev; /* Record this device in our private */
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/i5100_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ static int __devinit i5100_init_one(struct pci_dev *pdev,
goto bail_disable_ch1;
}

mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;

priv = mci->pvt_info;
priv->ranksperchan = ranksperch;
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/i5400_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx)

debugf0("MC: %s: %s(): mci = %p\n", __FILE__, __func__, mci);

mci->dev = &pdev->dev; /* record ptr to the generic device */
mci->pdev = &pdev->dev; /* record ptr to the generic device */

pvt = mci->pvt_info;
pvt->system_address = pdev; /* Record this device in our private */
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/i7300_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev,

debugf0("MC: " __FILE__ ": %s(): mci = %p\n", __func__, mci);

mci->dev = &pdev->dev; /* record ptr to the generic device */
mci->pdev = &pdev->dev; /* record ptr to the generic device */

pvt = mci->pvt_info;
pvt->pci_dev_16_0_fsb_ctlr = pdev; /* Record this device in our private */
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ static void i7core_unregister_mci(struct i7core_dev *i7core_dev)
i7core_pci_ctl_release(pvt);

/* Remove MC sysfs nodes */
edac_mc_del_mc(mci->dev);
edac_mc_del_mc(mci->pdev);

debugf1("%s: free mci struct\n", mci->ctl_name);
kfree(mci->ctl_name);
Expand Down Expand Up @@ -2188,7 +2188,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
/* Get dimm basic config */
get_dimm_config(mci);
/* record ptr to the generic device */
mci->dev = &i7core_dev->pdev[0]->dev;
mci->pdev = &i7core_dev->pdev[0]->dev;
/* Set the function pointer to an actual operation function */
mci->edac_check = i7core_check_error;

Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/i82443bxgx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static void i82443bxgx_edacmc_get_error_info(struct mem_ctl_info *mci,
*info)
{
struct pci_dev *pdev;
pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);
pci_read_config_dword(pdev, I82443BXGX_EAP, &info->eap);
if (info->eap & I82443BXGX_EAP_OFFSET_SBE)
/* Clear error to allow next error to be reported [p.61] */
Expand Down Expand Up @@ -260,7 +260,7 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
return -ENOMEM;

debugf0("MC: %s: %s(): mci = %p\n", __FILE__, __func__, mci);
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_EDO | MEM_FLAG_SDR | MEM_FLAG_RDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
pci_read_config_byte(pdev, I82443BXGX_DRAMC, &dramc);
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/i82860_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void i82860_get_error_info(struct mem_ctl_info *mci,
{
struct pci_dev *pdev;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);

/*
* This is a mess because there is no atomic way to read all the
Expand Down Expand Up @@ -211,7 +211,7 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
return -ENOMEM;

debugf3("%s(): init mci\n", __func__);
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_DDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
/* I"m not sure about this but I think that all RDRAM is SECDED */
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/i82875p_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void i82875p_get_error_info(struct mem_ctl_info *mci,
{
struct pci_dev *pdev;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);

/*
* This is a mess because there is no atomic way to read all the
Expand Down Expand Up @@ -430,7 +430,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
kobject_get(&mci->edac_mci_kobj);

debugf3("%s(): init mci\n", __func__);
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_DDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_UNKNOWN;
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/i82975x_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static void i82975x_get_error_info(struct mem_ctl_info *mci,
{
struct pci_dev *pdev;

pdev = to_pci_dev(mci->dev);
pdev = to_pci_dev(mci->pdev);

/*
* This is a mess because there is no atomic way to read all the
Expand Down Expand Up @@ -559,7 +559,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
}

debugf3("%s(): init mci\n", __func__);
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_DDR2;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
mci->edac_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/mpc85xx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,9 @@ static int __devinit mpc85xx_mc_err_probe(struct platform_device *op)
pdata = mci->pvt_info;
pdata->name = "mpc85xx_mc_err";
pdata->irq = NO_IRQ;
mci->dev = &op->dev;
mci->pdev = &op->dev;
pdata->edac_idx = edac_mc_idx++;
dev_set_drvdata(mci->dev, mci);
dev_set_drvdata(mci->pdev, mci);
mci->ctl_name = pdata->name;
mci->dev_name = pdata->name;

Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/mv64x60_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ static int __devinit mv64x60_mc_err_probe(struct platform_device *pdev)
}

pdata = mci->pvt_info;
mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
platform_set_drvdata(pdev, mci);
pdata->name = "mv64x60_mc_err";
pdata->irq = NO_IRQ;
Expand Down
6 changes: 3 additions & 3 deletions drivers/edac/pasemi_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static int system_mmc_id;

static u32 pasemi_edac_get_error_info(struct mem_ctl_info *mci)
{
struct pci_dev *pdev = to_pci_dev(mci->dev);
struct pci_dev *pdev = to_pci_dev(mci->pdev);
u32 tmp;

pci_read_config_dword(pdev, MCDEBUG_ERRSTA,
Expand All @@ -95,7 +95,7 @@ static u32 pasemi_edac_get_error_info(struct mem_ctl_info *mci)

static void pasemi_edac_process_error_info(struct mem_ctl_info *mci, u32 errsta)
{
struct pci_dev *pdev = to_pci_dev(mci->dev);
struct pci_dev *pdev = to_pci_dev(mci->pdev);
u32 errlog1a;
u32 cs;

Expand Down Expand Up @@ -225,7 +225,7 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev,
MCCFG_ERRCOR_ECC_GEN_EN |
MCCFG_ERRCOR_ECC_CRR_EN;

mci->dev = &pdev->dev;
mci->pdev = &pdev->dev;
mci->mtype_cap = MEM_FLAG_DDR | MEM_FLAG_RDDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
mci->edac_cap = (errcor & MCCFG_ERRCOR_ECC_GEN_EN) ?
Expand Down
Loading

0 comments on commit fd68750

Please sign in to comment.