[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130819104409.GA21520@lee--X1>
Date: Mon, 19 Aug 2013 11:44:09 +0100
From: Lee Jones <lee.jones@...aro.org>
To: Andrzej Hajda <a.hajda@...sung.com>
Cc: Rob Herring <rob.herring@...xeda.com>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Stephen Warren <swarren@...dotorg.org>,
Ian Campbell <ian.campbell@...rix.com>,
Rob Landley <rob@...dley.net>,
Samuel Ortiz <sameo@...ux.intel.com>,
Grant Likely <grant.likely@...aro.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Jonghwa Lee <jonghwa3.lee@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
"open list:OPEN FIRMWARE AND..." <devicetree@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND] max77693: added device tree support
> +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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists