Re: [PATCH 2/2] mfd: stmpe: move platform data into mfd driver

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

 



On Mon, 23 Mar 2015, Linus Walleij wrote:

> The STMPE platform data is only populated from the device tree
> in all existing users, so push the struct and make the OF case
> the norm.
> 
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
>  drivers/mfd/stmpe.c       | 41 ++++++++++++++++++++++++++++++-----------
>  include/linux/mfd/stmpe.h | 23 +----------------------
>  2 files changed, 31 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 2d7fae94c861..cb5f19749442 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c

[...]

>  /* Called from client specific probe routines */
>  int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
>  {
> -	struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev);
> +	struct stmpe_platform_data *pdata;
>  	struct device_node *np = ci->dev->of_node;
>  	struct stmpe *stmpe;
>  	int ret;
>  
> -	if (!pdata) {
> -		if (!np)
> -			return -EINVAL;
> +	if (!np)
> +		return -EINVAL;

Nit: I believe this is now impossible.

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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux