pinctrl: imx21: include linux/module.h
Subsystems (4)
PATCH 1/1 pinctrl: imx21: include linux/module.h
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.
--- drivers/pinctrl/freescale/pinctrl-imx21.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/freescale/pinctrl-imx21.c +1 -0
@@ -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"
Signature · 1 line
2.9.0
Fabio Estevam
maintainerHi Arnd,
Quoted 10 lines · Arnd Bergmann
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 <[email protected]>Fixes e2756baa4217 ("pinctrl: imx21: make it explicitly non-modular")
I think the correct fix here would be:
drivers/pinctrl/freescale/pinctrl-imx21.c +0 -1
@@ -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.
Quoted 14 lines · CEST Fabio Estevam
I think the correct fix here would be:
drivers/pinctrl/freescale/pinctrl-imx21.c +0
-1@@ -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 = {
Quoted 1 line
If you agree I can send a formal patch.
Fine with me too.
Arnd
Quoted 28 lines · [Re: [PATCH] pinctrl: imx21: include linux/module.h] On 06/07/2016 (Wed 10:15)…
Hi Arnd,
Quoted 10 lines · Arnd Bergmann
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 <[email protected]>Fixes e2756baa4217 ("pinctrl: imx21: make it explicitly non-modular")I think the correct fix here would be:
drivers/pinctrl/freescale/pinctrl-imx21.c +0
-1@@ -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 = {
Quoted 1 line
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.
--
Quoted 8 lines · CEST Paul Gortmaker
Quoted 8 lines
drivers/pinctrl/freescale/pinctrl-imx21.c +0
-1@@ -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);
Quoted 8 lines
Quoted 5 lines
drivers/pinctrl/freescale/pinctrl-imx21.c +0
-0static struct platform_driver imx21_pinctrl_driver = { .driver = {If you agree I can send a formal patch.
Yes, deleting the
MODULE_DEVICE_TABLEis 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