From: Grant Likely <grant.likely@secretlab.ca>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linuxppc-dev@ozlabs.org, linux-mtd@lists.infradead.org,
ben-linux@fluff.org
Subject: Re: [PATCH 2/2] maps/mtd-ram: add an of-platform driver
Date: Wed, 20 May 2009 22:21:05 -0600 [thread overview]
Message-ID: <fa686aa40905202121m60ead59dm6a12821085b17d8f@mail.gmail.com> (raw)
In-Reply-To: <20090521004626.GA1635@pengutronix.de>
On Wed, May 20, 2009 at 6:46 PM, Wolfram Sang <w.sang@pengutronix.de> wrote=
:
>> > + =A0 =A0 =A0 name =3D of_get_property(op->node, "name", NULL);
>> > + =A0 =A0 =A0 if (!name) {
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D -ENOENT;
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev_dbg(&op->dev, "could not get node na=
me\n");
>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto bad1;
>> > + =A0 =A0 =A0 }
>
> Can I just use
>
> =A0 =A0 =A0 =A0name =3D op->node->name
>
> here? I wonder because of_device in asm/of_device.h states 'node' as "to =
be
> obsoleted"
It may be labeled as such, but it's been so for over 2 years now, and
op->node is used all over the place. I think Ben would like to
eventually move to using the node pointer in archdata, but that will
require a fair bit of refactoring.
Ben will kick me if I'm wrong, but I'll go out on a limb and say that
I think you're okay to use it.
>. And could I safely assume that all architectures will have the node
> entry?
All three current users do.
>> > +static struct of_device_id of_ram_match[] =3D {
>> > + =A0 =A0 =A0 { .compatible =3D "mtd-ram", },
>> > + =A0 =A0 =A0 {},
>> > +};
>> > +MODULE_DEVICE_TABLE(of, of_ram_match);
>> > +
>> > +static struct of_platform_driver of_ram_driver =3D {
>>
>> __devinitdata
>
> I assume you mean the match_table and not the of_platform_driver. Shouldn=
't it
> even better be const and using __devinitconst?
correct on both counts.
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
prev parent reply other threads:[~2009-05-21 4:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 17:41 mtd-ram: add of-support Wolfram Sang
2009-01-21 17:41 ` [PATCH 1/2] maps/mtd-ram: refactor probe and remove Wolfram Sang
2009-05-19 14:41 ` Grant Likely
2009-01-21 17:41 ` [PATCH 2/2] maps/mtd-ram: add an of-platform driver Wolfram Sang
2009-01-24 22:30 ` Wolfram Sang
2009-05-19 14:57 ` Grant Likely
2009-05-19 20:30 ` Wolfram Sang
2009-05-19 20:36 ` Grant Likely
2009-05-21 0:46 ` Wolfram Sang
2009-05-21 4:21 ` Grant Likely [this message]
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=fa686aa40905202121m60ead59dm6a12821085b17d8f@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=ben-linux@fluff.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=w.sang@pengutronix.de \
/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).