mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: "Chris Zhong" <zyw@rock-chips.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>,
	"Samuel Ortiz" <sameo@linux.intel.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"Alessandro Zummo" <a.zummo@towertech.it>,
	"Mike Turquette" <mturquette@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	rtc-linux@googlegroups.com,
	"Grant Likely" <grant.likely@linaro.org>,
	"Lin Huang" <hl@rock-chips.com>,
	"Tao Huang" <huangtao@rock-chips.com>,
	"Eddie Cai" <cf@rock-chips.com>,
	zhangqing <zhangqing@rock-chips.com>, xxx <xxx@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Olof Johansson" <olof@lixom.net>,
	"Sonny Rao" <sonnyrao@chromium.org>,
	"Dmitry Torokhov" <dtor@chromium.org>,
	"Javier Martinez Canillas" <javier.martinez@collabora.co.uk>,
	"Kever Yang" <kever.yang@rock-chips.com>
Subject: Re: [PATCH v6 2/5] MFD: RK808: Add new mfd driver for RK808
Date: Wed, 27 Aug 2014 18:02:51 +0100	[thread overview]
Message-ID: <20140827170251.GB24579@lee--X1> (raw)
In-Reply-To: <CAD=FV=WAN=WCdMd4hWDr8qzsg3TWTGX_OAa=6KHvyWrqjmk7MA@mail.gmail.com>

On Wed, 27 Aug 2014, Doug Anderson wrote:
> On Wed, Aug 27, 2014 at 6:39 AM, Lee Jones <lee.jones@linaro.org> wrote:
> >> +static int rk808_probe(struct i2c_client *client,
> >> +                    const struct i2c_device_id *id)
> >> +{
> >> +     int ret;
> >> +     int pm_off = 0;
> >> +     struct rk808 *rk808;
> >> +     struct device_node *np = client->dev.of_node;
> >
> > Are you prepared for np == NULL?
> 
> Given that the driver no longer supports getting its config from
> platform data, I think it simply depends on OF now.  It seems like we
> could add a "&& OF" to the dependencies.  Is that OK with you?

If the driver depends on OF, then it should be specified in the Kconfig.

> It doesn't hurt to still add a check for np == NULL and bail out, though.

If we're depending on OF, then there's no real need to do this.

And of_property_read_bool() does a NULL check on np anyway, so not
checking is still okay.  I was just wondering if not checking was a
mistake or intentional?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-08-27 17:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 14:14 Chris Zhong
2014-08-26 17:08 ` Doug Anderson
2014-08-27 13:39 ` Lee Jones
2014-08-27 15:56   ` Doug Anderson
2014-08-27 17:02     ` Lee Jones [this message]
2014-08-27 17:21   ` Dmitry Torokhov
2014-08-27 20:01     ` Doug Anderson
2014-08-28  7:33     ` Lee Jones
2014-08-27 19:53 ` Heiko Stübner
2014-08-27 19:59   ` Doug Anderson
2014-08-27 20:12     ` Heiko Stübner

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=20140827170251.GB24579@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=a.zummo@towertech.it \
    --cc=broonie@kernel.org \
    --cc=cf@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dtor@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=heiko@sntech.de \
    --cc=hl@rock-chips.com \
    --cc=huangtao@rock-chips.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=javier.martinez@collabora.co.uk \
    --cc=kever.yang@rock-chips.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.com \
    --cc=sonnyrao@chromium.org \
    --cc=xxx@rock-chips.com \
    --cc=zhangqing@rock-chips.com \
    --cc=zyw@rock-chips.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

all inboxes | Powered by JetHome®