Re: [PATCH RESEND] max77693: added device tree support

From: Lee Jones
Date: Mon Aug 19 2013 - 06:44:21 EST


> +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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/