Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a26f95fe authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Grant Likely
Browse files

of/edac: fix build breakage in drivers



Fixes build errors in EDAC drivers caused by the OF
device_node pointer being moved into struct device

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 4eecb178
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -229,7 +229,7 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,


	pdata->edac_idx = edac_pci_idx++;
	pdata->edac_idx = edac_pci_idx++;


	res = of_address_to_resource(op->node, 0, &r);
	res = of_address_to_resource(op->dev.of_node, 0, &r);
	if (res) {
	if (res) {
		printk(KERN_ERR "%s: Unable to get resource for "
		printk(KERN_ERR "%s: Unable to get resource for "
		       "PCI err regs\n", __func__);
		       "PCI err regs\n", __func__);
@@ -274,7 +274,7 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
	}
	}


	if (edac_op_state == EDAC_OPSTATE_INT) {
	if (edac_op_state == EDAC_OPSTATE_INT) {
		pdata->irq = irq_of_parse_and_map(op->node, 0);
		pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
		res = devm_request_irq(&op->dev, pdata->irq,
		res = devm_request_irq(&op->dev, pdata->irq,
				       mpc85xx_pci_isr, IRQF_DISABLED,
				       mpc85xx_pci_isr, IRQF_DISABLED,
				       "[EDAC] PCI err", pci);
				       "[EDAC] PCI err", pci);
@@ -529,7 +529,7 @@ static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
	edac_dev->ctl_name = pdata->name;
	edac_dev->ctl_name = pdata->name;
	edac_dev->dev_name = pdata->name;
	edac_dev->dev_name = pdata->name;


	res = of_address_to_resource(op->node, 0, &r);
	res = of_address_to_resource(op->dev.of_node, 0, &r);
	if (res) {
	if (res) {
		printk(KERN_ERR "%s: Unable to get resource for "
		printk(KERN_ERR "%s: Unable to get resource for "
		       "L2 err regs\n", __func__);
		       "L2 err regs\n", __func__);
@@ -576,7 +576,7 @@ static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
	}
	}


	if (edac_op_state == EDAC_OPSTATE_INT) {
	if (edac_op_state == EDAC_OPSTATE_INT) {
		pdata->irq = irq_of_parse_and_map(op->node, 0);
		pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
		res = devm_request_irq(&op->dev, pdata->irq,
		res = devm_request_irq(&op->dev, pdata->irq,
				       mpc85xx_l2_isr, IRQF_DISABLED,
				       mpc85xx_l2_isr, IRQF_DISABLED,
				       "[EDAC] L2 err", edac_dev);
				       "[EDAC] L2 err", edac_dev);
@@ -978,7 +978,7 @@ static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
	mci->ctl_name = pdata->name;
	mci->ctl_name = pdata->name;
	mci->dev_name = pdata->name;
	mci->dev_name = pdata->name;


	res = of_address_to_resource(op->node, 0, &r);
	res = of_address_to_resource(op->dev.of_node, 0, &r);
	if (res) {
	if (res) {
		printk(KERN_ERR "%s: Unable to get resource for MC err regs\n",
		printk(KERN_ERR "%s: Unable to get resource for MC err regs\n",
		       __func__);
		       __func__);
@@ -1052,7 +1052,7 @@ static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
		out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_SBE, 0x10000);
		out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_SBE, 0x10000);


		/* register interrupts */
		/* register interrupts */
		pdata->irq = irq_of_parse_and_map(op->node, 0);
		pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
		res = devm_request_irq(&op->dev, pdata->irq,
		res = devm_request_irq(&op->dev, pdata->irq,
				       mpc85xx_mc_isr,
				       mpc85xx_mc_isr,
					IRQF_DISABLED | IRQF_SHARED,
					IRQF_DISABLED | IRQF_SHARED,
+3 −3
Original line number Original line Diff line number Diff line
@@ -1022,7 +1022,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
	int status = 0;
	int status = 0;
	const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK);
	const u32 memcheck = (mcopt1 & SDRAM_MCOPT1_MCHK_MASK);
	struct ppc4xx_edac_pdata *pdata = NULL;
	struct ppc4xx_edac_pdata *pdata = NULL;
	const struct device_node *np = op->node;
	const struct device_node *np = op->dev.of_node;


	if (match == NULL)
	if (match == NULL)
		return -EINVAL;
		return -EINVAL;
@@ -1113,7 +1113,7 @@ ppc4xx_edac_register_irq(struct of_device *op, struct mem_ctl_info *mci)
	int status = 0;
	int status = 0;
	int ded_irq, sec_irq;
	int ded_irq, sec_irq;
	struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
	struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
	struct device_node *np = op->node;
	struct device_node *np = op->dev.of_node;


	ded_irq = irq_of_parse_and_map(np, INTMAP_ECCDED_INDEX);
	ded_irq = irq_of_parse_and_map(np, INTMAP_ECCDED_INDEX);
	sec_irq = irq_of_parse_and_map(np, INTMAP_ECCSEC_INDEX);
	sec_irq = irq_of_parse_and_map(np, INTMAP_ECCSEC_INDEX);
@@ -1243,7 +1243,7 @@ ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match)
	int status = 0;
	int status = 0;
	u32 mcopt1, memcheck;
	u32 mcopt1, memcheck;
	dcr_host_t dcr_host;
	dcr_host_t dcr_host;
	const struct device_node *np = op->node;
	const struct device_node *np = op->dev.of_node;
	struct mem_ctl_info *mci = NULL;
	struct mem_ctl_info *mci = NULL;
	static int ppc4xx_edac_instance;
	static int ppc4xx_edac_instance;