From: Sean MacLennan <smaclennan@pikatech.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org, michal.simek@petalogix.com,
microblaze-uclinux@itee.uq.edu.au, sparclinux@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, davem@davemloft.net
Subject: Re: [V2 PATCH 06/10] of/drivers: Always use struct device.of_node to get node pointer
Date: Thu, 18 Mar 2010 13:10:47 -0400 [thread overview]
Message-ID: <20100318131047.6dbdef73@lappy.seanm.ca> (raw)
In-Reply-To: <fa686aa41003181007k9202cd6n44d2d3997ef626a1@mail.gmail.com>
On Thu, 18 Mar 2010 11:07:35 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:
> On Thu, Mar 18, 2010 at 10:59 AM, Sean MacLennan
> <smaclennan@pikatech.com> wrote:
> > On Thu, 18 Mar 2010 09:22:39 -0600
> > Grant Likely <grant.likely@secretlab.ca> wrote:
> >
> >> The following structure elements duplicate the information in
> >> 'struct device.of_node' and so are being eliminated. =A0This patches
> >> makes all readers of the following elements use device.of_node
> >> instead.
> >
> > The NDFC driver also needs a patch... or at least the version from
> > your last of_patch set does. I am included the patch I needed to
> > get it to compile.
>=20
> Thanks Sean, I've added this patch to my series. s-o-b line please?
>=20
> g.
Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
---
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 19d94a2..5a232ec 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -238,14 +238,14 @@ static int __devinit ndfc_probe(struct of_device *ofd=
ev,
dev_set_drvdata(&ofdev->dev, ndfc);
=20
/* Read the reg property to get the chip select */
- reg =3D of_get_property(ofdev->node, "reg", &len);
+ reg =3D of_get_property(ofdev->dev.of_node, "reg", &len);
if (reg =3D=3D NULL || len !=3D 12) {
dev_err(&ofdev->dev, "unable read reg property (%d)\n", len);
return -ENOENT;
}
ndfc->chip_select =3D reg[0];
=20
- ndfc->ndfcbase =3D of_iomap(ofdev->node, 0);
+ ndfc->ndfcbase =3D of_iomap(ofdev->dev.of_node, 0);
if (!ndfc->ndfcbase) {
dev_err(&ofdev->dev, "failed to get memory\n");
return -EIO;
@@ -254,20 +254,20 @@ static int __devinit ndfc_probe(struct of_device *ofd=
ev,
ccr =3D NDFC_CCR_BS(ndfc->chip_select);
=20
/* It is ok if ccr does not exist - just default to 0 */
- reg =3D of_get_property(ofdev->node, "ccr", NULL);
+ reg =3D of_get_property(ofdev->dev.of_node, "ccr", NULL);
if (reg)
ccr |=3D *reg;
=20
out_be32(ndfc->ndfcbase + NDFC_CCR, ccr);
=20
/* Set the bank settings if given */
- reg =3D of_get_property(ofdev->node, "bank-settings", NULL);
+ reg =3D of_get_property(ofdev->dev.of_node, "bank-settings", NULL);
if (reg) {
int offset =3D NDFC_BCFG0 + (ndfc->chip_select << 2);
out_be32(ndfc->ndfcbase + offset, *reg);
}
=20
- err =3D ndfc_chip_init(ndfc, ofdev->node);
+ err =3D ndfc_chip_init(ndfc, ofdev->dev.of_node);
if (err) {
iounmap(ndfc->ndfcbase);
return err;
next prev parent reply other threads:[~2010-03-18 17:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 15:22 [V2 PATCH 00/10] of: Consolidate scattered device node pointers in struct device Grant Likely
2010-03-18 15:22 ` [V2 PATCH 01/10] driver-core: Add device node pointer to " Grant Likely
2010-03-18 15:22 ` [V2 PATCH 02/10] i2c/of: Allow device node to be passed via i2c_board_info Grant Likely
2010-03-18 15:22 ` [V2 PATCH 03/10] arch/sparc: Always use 'struct device.of_node' to get device node pointer Grant Likely
2010-03-18 15:22 ` [V2 PATCH 04/10] arch/powerpc: " Grant Likely
2010-03-18 15:22 ` [V2 PATCH 05/10] arch/microblaze: " Grant Likely
2010-03-18 15:22 ` [V2 PATCH 06/10] of/drivers: Always use struct device.of_node to get " Grant Likely
2010-03-18 15:58 ` Jochen Friedrich
2010-03-18 16:24 ` Grant Likely
2010-03-18 16:59 ` Sean MacLennan
2010-03-18 17:07 ` Grant Likely
2010-03-18 17:10 ` Sean MacLennan [this message]
2010-03-18 17:12 ` Sean MacLennan
2010-03-18 15:22 ` [V2 PATCH 07/10] of: eliminate calls to dev_archdata_set_node() Grant Likely
2010-03-18 15:22 ` [V2 PATCH 08/10] arch/powerpc: Remove obsolete dev_archdata.of_node and of_devce.node Grant Likely
2010-03-18 15:47 ` Anton Vorontsov
2010-03-18 16:22 ` Grant Likely
2010-03-18 15:22 ` [V2 PATCH 09/10] arch/microblaze: " Grant Likely
2010-03-18 15:23 ` [V2 PATCH 10/10] arch/sparc: Remove obsolete dev_archdata.prom_node " Grant Likely
2010-03-18 15:35 ` [V2 PATCH 00/10] of: Consolidate scattered device node pointers in struct device Grant Likely
2010-03-23 6:57 ` Michael Ellerman
2010-03-23 7:06 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100318131047.6dbdef73@lappy.seanm.ca \
--to=smaclennan@pikatech.com \
--cc=davem@davemloft.net \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michal.simek@petalogix.com \
--cc=microblaze-uclinux@itee.uq.edu.au \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).