Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1437690 > unrolled thread

[PATCH] pinctrl: imx21: include linux/module.h

Started byArnd Bergmann <arnd@arndb.de>
First post2016-07-06 15:00 +0200
Last post2016-07-06 15:50 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] pinctrl: imx21: include linux/module.h Arnd Bergmann <arnd@arndb.de> - 2016-07-06 15:00 +0200
    Re: [PATCH] pinctrl: imx21: include linux/module.h Fabio Estevam <festevam@gmail.com> - 2016-07-06 15:20 +0200
      Re: [PATCH] pinctrl: imx21: include linux/module.h Arnd Bergmann <arnd@arndb.de> - 2016-07-06 15:20 +0200
      Re: [PATCH] pinctrl: imx21: include linux/module.h Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-07-06 15:30 +0200
        Re: [PATCH] pinctrl: imx21: include linux/module.h Arnd Bergmann <arnd@arndb.de> - 2016-07-06 15:50 +0200

#1437690 — [PATCH] pinctrl: imx21: include linux/module.h

FromArnd Bergmann <arnd@arndb.de>
Date2016-07-06 15:00 +0200
Subject[PATCH] pinctrl: imx21: include linux/module.h
Message-ID<rRUAN-Sa-9@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1437701

FromFabio Estevam <festevam@gmail.com>
Date2016-07-06 15:20 +0200
Message-ID<rRUU9-1e4-9@gated-at.bofh.it>
In reply to#1437690
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.

[toc] | [prev] | [next] | [standalone]


#1437706

FromArnd Bergmann <arnd@arndb.de>
Date2016-07-06 15:20 +0200
Message-ID<rRUUa-1e4-21@gated-at.bofh.it>
In reply to#1437701
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

[toc] | [prev] | [next] | [standalone]


#1437716

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2016-07-06 15:30 +0200
Message-ID<rRV3Q-1jb-17@gated-at.bofh.it>
In reply to#1437701
[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.
--

[toc] | [prev] | [next] | [standalone]


#1437737

FromArnd Bergmann <arnd@arndb.de>
Date2016-07-06 15:50 +0200
Message-ID<rRVnc-1pJ-17@gated-at.bofh.it>
In reply to#1437716
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web