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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> +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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux