devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Rob Herring <rob.herring@calxeda.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Rob Landley <rob@landley.net>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Grant Likely <grant.likely@linaro.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Jonghwa Lee <jonghwa3.lee@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND] max77693: added device tree support
Date: Mon, 19 Aug 2013 11:44:09 +0100	[thread overview]
Message-ID: <20130819104409.GA21520@lee--X1> (raw)
In-Reply-To: <1376907121-13815-1-git-send-email-a.hajda@samsung.com>

> +static int max77693_get_platform_data(struct max77693_dev *max77693,
> +				      struct device *dev)
> +{
> +	struct device_node *node = dev->of_node;
> +	struct max77693_platform_data *pdata = dev->platform_data;
> +
> +	if (node) {
> +		max77693->wakeup = of_property_read_bool(node, "wakeup-source");
> +		return 0;
> +	}
> +
> +	if (pdata) {
> +		max77693->wakeup = pdata->wakeup;
> +		return 0;
> +	}

Hmm... Unless things have changed, pdata usually takes precedence over
DT i.e. if pdata is present it should be used. Can you reverse these
two if statements please? 

Sorry to mess you around.

> +	dev_err(dev, "No platform data found.\n");
> +	return -EINVAL;
> +}
> +

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

  reply	other threads:[~2013-08-19 10:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 10:12 [PATCH RESEND] max77693: added device tree support Andrzej Hajda
2013-08-19 10:44 ` Lee Jones [this message]
2013-08-19 11:40   ` [PATCH v2] " Andrzej Hajda
2013-08-19 12:02     ` Lee Jones
2013-08-19 21:18     ` Stephen Warren
2013-08-20  7:13       ` Lee Jones
2013-08-20 12:41       ` Andrzej Hajda
2013-08-20 16:41         ` Stephen Warren

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=20130819104409.GA21520@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=a.hajda@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sameo@linux.intel.com \
    --cc=swarren@wwwdotorg.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).