From: Francois Romieu <romieu@fr.zoreil.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
Tomasz Figa <tomasz.figa@gmail.com>,
Rob Herring <rob.herring@calxeda.com>,
Grant Likely <grant.likely@linaro.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: dm9000: Allow instantiation using device tree
Date: Sun, 19 May 2013 10:38:22 +0200 [thread overview]
Message-ID: <20130519083822.GA31087@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20130519070538.GX32299@pengutronix.de>
Sascha Hauer <s.hauer@pengutronix.de> :
[...]
> > +#ifdef CONFIG_OF
> > +static struct dm9000_plat_data *dm9000_parse_dt(struct device *dev)
> > +{
> > + struct dm9000_plat_data *pdata;
> > + struct device_node *np = dev->of_node;
> > + const void *prop;
> > + int len;
> > +
> > + if (!np)
> > + return NULL;
>
> You should be able to kill the ifdef around this function by doing
>
> if (!IS_ENABLED(CONFIG_OF) || !np)
> return NULL;
It will be the first such use of IS_ENABLED in net land.
David, is it ok ?
--
Ueimor
next prev parent reply other threads:[~2013-05-19 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-18 23:03 [PATCH] net: dm9000: Allow instantiation using device tree Tomasz Figa
2013-05-19 7:05 ` Sascha Hauer
2013-05-19 8:38 ` Francois Romieu [this message]
2013-05-19 8:54 ` Tomasz Figa
2013-05-19 10:35 ` Sascha Hauer
2013-05-19 11:04 ` Tomasz Figa
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=20130519083822.GA31087@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=s.hauer@pengutronix.de \
--cc=tomasz.figa@gmail.com \
/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).