From: Lee Jones <lee.jones@linaro.org>
To: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Torgue <alexandre.torgue@st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com, kbuild-all@01.org
Subject: Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
Date: Wed, 22 May 2019 06:48:33 +0100 [thread overview]
Message-ID: <20190522054833.GB4574@dell> (raw)
In-Reply-To: <1558338735-8444-1-git-send-email-amelie.delaunay@st.com>
On Mon, 20 May 2019, Amelie Delaunay wrote:
> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
> not exist:
> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
> pctl->gpio_chip.of_node = np;
>
> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> ---
> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
> index eba872c..bb64aa0 100644
> --- a/drivers/pinctrl/pinctrl-stmfx.c
> +++ b/drivers/pinctrl/pinctrl-stmfx.c
> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
> pctl->gpio_chip.base = -1;
> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
> pctl->gpio_chip.can_sleep = true;
> +#ifdef CONFIG_OF_GPIO
> pctl->gpio_chip.of_node = np;
> +#endif
This is pretty ugly. Will STMFX ever be used without OF support? If
not, it might be better to place this restriction on the driver as a
whole.
Incidentally, why is this blanked out in the structure definition?
Even 'struct device' doesn't do this.
> pctl->gpio_chip.need_valid_mask = true;
>
> ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl);
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Amelie Delaunay <amelie.delaunay@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
kbuild-all@01.org, Maxime Coquelin <mcoquelin.stm32@gmail.com>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
Date: Wed, 22 May 2019 06:48:33 +0100 [thread overview]
Message-ID: <20190522054833.GB4574@dell> (raw)
In-Reply-To: <1558338735-8444-1-git-send-email-amelie.delaunay@st.com>
On Mon, 20 May 2019, Amelie Delaunay wrote:
> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
> not exist:
> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
> pctl->gpio_chip.of_node = np;
>
> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> ---
> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
> index eba872c..bb64aa0 100644
> --- a/drivers/pinctrl/pinctrl-stmfx.c
> +++ b/drivers/pinctrl/pinctrl-stmfx.c
> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
> pctl->gpio_chip.base = -1;
> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
> pctl->gpio_chip.can_sleep = true;
> +#ifdef CONFIG_OF_GPIO
> pctl->gpio_chip.of_node = np;
> +#endif
This is pretty ugly. Will STMFX ever be used without OF support? If
not, it might be better to place this restriction on the driver as a
whole.
Incidentally, why is this blanked out in the structure definition?
Even 'struct device' doesn't do this.
> pctl->gpio_chip.need_valid_mask = true;
>
> ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl);
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-22 5:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 7:52 [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined Amelie Delaunay
2019-05-20 7:52 ` Amelie Delaunay
2019-05-20 7:52 ` Amelie Delaunay
2019-05-22 0:22 ` Randy Dunlap
2019-05-22 0:22 ` Randy Dunlap
2019-05-22 5:48 ` Lee Jones [this message]
2019-05-22 5:48 ` Lee Jones
2019-05-22 8:08 ` Amelie DELAUNAY
2019-05-22 8:08 ` Amelie DELAUNAY
2019-05-22 8:41 ` Lee Jones
2019-05-22 8:41 ` Lee Jones
2019-05-22 9:20 ` Amelie DELAUNAY
2019-05-22 9:20 ` Amelie DELAUNAY
2019-05-22 9:30 ` Lee Jones
2019-05-22 9:30 ` Lee Jones
2019-05-22 21:48 ` Linus Walleij
2019-05-22 21:48 ` Linus Walleij
2019-05-23 14:11 ` Amelie DELAUNAY
2019-05-23 14:11 ` Amelie DELAUNAY
2019-05-23 19:18 ` Linus Walleij
2019-05-23 19:18 ` Linus Walleij
2019-05-24 7:27 ` Amelie DELAUNAY
2019-05-24 7:27 ` Amelie DELAUNAY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190522054833.GB4574@dell \
--to=lee.jones@linaro.org \
--cc=alexandre.torgue@st.com \
--cc=amelie.delaunay@st.com \
--cc=kbuild-all@01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.