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

From: Lee Jones
Date: Mon Mar 23 2015 - 12:11:25 EST


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-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/