* [PATCH] pinctrl: imx21: include linux/module.h
@ 2016-07-06 12:52 Arnd Bergmann
2016-07-06 13:15 ` Fabio Estevam
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-07-06 12:52 UTC (permalink / raw)
To: Linus Walleij
Cc: Arnd Bergmann, Paul Gortmaker, Laxman Dewangan, linux-gpio,
linux-kernel
The pinctrl driver includes a device table, but the macro used for
declaring it is declared in a header that is not visible here:
drivers/pinctrl/freescale/pinctrl-imx21.c:328:1: error: data definition has no type or storage class [-Werror]
MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
This adds the missing include.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e2756baa4217 ("pinctrl: imx21: make it explicitly non-modular")
---
drivers/pinctrl/freescale/pinctrl-imx21.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx21.c b/drivers/pinctrl/freescale/pinctrl-imx21.c
index b9f9b3b8eeb1..8cf33d608164 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx21.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx21.c
@@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/pinctrl.h>
+#include <linux/module.h>
#include "pinctrl-imx1.h"
--
2.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: imx21: include linux/module.h
2016-07-06 12:52 [PATCH] pinctrl: imx21: include linux/module.h Arnd Bergmann
@ 2016-07-06 13:15 ` Fabio Estevam
2016-07-06 13:20 ` Arnd Bergmann
2016-07-06 13:21 ` Paul Gortmaker
0 siblings, 2 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-07-06 13:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Linus Walleij, Paul Gortmaker, Laxman Dewangan,
linux-gpio@vger.kernel.org, linux-kernel
Hi Arnd,
On Wed, Jul 6, 2016 at 9:52 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> The pinctrl driver includes a device table, but the macro used for
> declaring it is declared in a header that is not visible here:
>
> drivers/pinctrl/freescale/pinctrl-imx21.c:328:1: error: data definition has no type or storage class [-Werror]
> MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
>
> This adds the missing include.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: e2756baa4217 ("pinctrl: imx21: make it explicitly non-modular")
I think the correct fix here would be:
--- a/drivers/pinctrl/freescale/pinctrl-imx21.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx21.c
@@ -325,7 +325,6 @@ static const struct of_device_id imx21_pinctrl_of_match[] =
{ .compatible = "fsl,imx21-iomuxc", },
{ }
};
-MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
static struct platform_driver imx21_pinctrl_driver = {
.driver = {
If you agree I can send a formal patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: imx21: include linux/module.h
2016-07-06 13:15 ` Fabio Estevam
@ 2016-07-06 13:20 ` Arnd Bergmann
2016-07-06 13:21 ` Paul Gortmaker
1 sibling, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-07-06 13:20 UTC (permalink / raw)
To: Fabio Estevam
Cc: Linus Walleij, Paul Gortmaker, Laxman Dewangan,
linux-gpio@vger.kernel.org, linux-kernel
On Wednesday, July 6, 2016 10:15:41 AM CEST Fabio Estevam wrote:
> I think the correct fix here would be:
>
> --- a/drivers/pinctrl/freescale/pinctrl-imx21.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx21.c
> @@ -325,7 +325,6 @@ static const struct of_device_id imx21_pinctrl_of_match[] =
> { .compatible = "fsl,imx21-iomuxc", },
> { }
> };
> -MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
>
> static struct platform_driver imx21_pinctrl_driver = {
> .driver = {
>
>
> If you agree I can send a formal patch.
Fine with me too.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: imx21: include linux/module.h
2016-07-06 13:15 ` Fabio Estevam
2016-07-06 13:20 ` Arnd Bergmann
@ 2016-07-06 13:21 ` Paul Gortmaker
2016-07-06 13:45 ` Arnd Bergmann
1 sibling, 1 reply; 5+ messages in thread
From: Paul Gortmaker @ 2016-07-06 13:21 UTC (permalink / raw)
To: Fabio Estevam
Cc: Arnd Bergmann, Linus Walleij, Laxman Dewangan,
linux-gpio@vger.kernel.org, linux-kernel
[Re: [PATCH] pinctrl: imx21: include linux/module.h] On 06/07/2016 (Wed 10:15) Fabio Estevam wrote:
> Hi Arnd,
>
> On Wed, Jul 6, 2016 at 9:52 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > The pinctrl driver includes a device table, but the macro used for
> > declaring it is declared in a header that is not visible here:
> >
> > drivers/pinctrl/freescale/pinctrl-imx21.c:328:1: error: data definition has no type or storage class [-Werror]
> > MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
> >
> > This adds the missing include.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: e2756baa4217 ("pinctrl: imx21: make it explicitly non-modular")
>
> I think the correct fix here would be:
>
> --- a/drivers/pinctrl/freescale/pinctrl-imx21.c
> +++ b/drivers/pinctrl/freescale/pinctrl-imx21.c
> @@ -325,7 +325,6 @@ static const struct of_device_id imx21_pinctrl_of_match[] =
> { .compatible = "fsl,imx21-iomuxc", },
> { }
> };
> -MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
>
> static struct platform_driver imx21_pinctrl_driver = {
> .driver = {
>
>
> If you agree I can send a formal patch.
Yes, deleting the MODULE_DEVICE_TABLE is the right fix. I'm curious why
that never showed up in all the build coverage I did...
Paul.
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: imx21: include linux/module.h
2016-07-06 13:21 ` Paul Gortmaker
@ 2016-07-06 13:45 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-07-06 13:45 UTC (permalink / raw)
To: Paul Gortmaker
Cc: Fabio Estevam, Linus Walleij, Laxman Dewangan,
linux-gpio@vger.kernel.org, linux-kernel
On Wednesday, July 6, 2016 9:21:39 AM CEST Paul Gortmaker wrote:
> > --- a/drivers/pinctrl/freescale/pinctrl-imx21.c
> > +++ b/drivers/pinctrl/freescale/pinctrl-imx21.c
> > @@ -325,7 +325,6 @@ static const struct of_device_id imx21_pinctrl_of_match[] =
> > { .compatible = "fsl,imx21-iomuxc", },
> > { }
> > };
> > -MODULE_DEVICE_TABLE(of, imx21_pinctrl_of_match);
> >
> > static struct platform_driver imx21_pinctrl_driver = {
> > .driver = {
> >
> >
> > If you agree I can send a formal patch.
>
> Yes, deleting the MODULE_DEVICE_TABLE is the right fix. I'm curious why
> that never showed up in all the build coverage I did...
I needed several hundred randconfig builds before hitting it, I think
it's just rare because the driver is not enabled most of the time, and
it's possible that the header sometimes gets included implicitly.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-06 13:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 12:52 [PATCH] pinctrl: imx21: include linux/module.h Arnd Bergmann
2016-07-06 13:15 ` Fabio Estevam
2016-07-06 13:20 ` Arnd Bergmann
2016-07-06 13:21 ` Paul Gortmaker
2016-07-06 13:45 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).