2013-07-29 07:38:24

by Niels de Vos

[permalink] [raw]
Subject: [PATCH] imx2_wdt: expose module alias for loading from device-tree

Enable auto loading by udev when imx2_wdt is compiled as a module.

Signed-off-by: Niels de Vos <[email protected]>
Cc: Shawn Guo <[email protected]>
---
drivers/watchdog/imx2_wdt.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 693ac3f..17680aa 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -322,6 +322,7 @@ static const struct of_device_id imx2_wdt_dt_ids[] = {
{ .compatible = "fsl,imx21-wdt", },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, imx2_wdt_dt_ids);

static struct platform_driver imx2_wdt_driver = {
.remove = __exit_p(imx2_wdt_remove),
--
1.7.11.7


2013-07-30 03:01:55

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH] imx2_wdt: expose module alias for loading from device-tree

On Mon, Jul 29, 2013 at 09:38:18AM +0200, Niels de Vos wrote:
> Enable auto loading by udev when imx2_wdt is compiled as a module.
>
> Signed-off-by: Niels de Vos <[email protected]>
> Cc: Shawn Guo <[email protected]>

Acked-by: Shawn Guo <[email protected]>

> ---
> drivers/watchdog/imx2_wdt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 693ac3f..17680aa 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -322,6 +322,7 @@ static const struct of_device_id imx2_wdt_dt_ids[] = {
> { .compatible = "fsl,imx21-wdt", },
> { /* sentinel */ }
> };
> +MODULE_DEVICE_TABLE(of, imx2_wdt_dt_ids);
>
> static struct platform_driver imx2_wdt_driver = {
> .remove = __exit_p(imx2_wdt_remove),
> --
> 1.7.11.7
>

2013-10-29 07:36:07

by Wim Van Sebroeck

[permalink] [raw]
Subject: Re: [PATCH] imx2_wdt: expose module alias for loading from device-tree

Hi Niels,

> Enable auto loading by udev when imx2_wdt is compiled as a module.
>
> Signed-off-by: Niels de Vos <[email protected]>
> Cc: Shawn Guo <[email protected]>
> ---
> drivers/watchdog/imx2_wdt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 693ac3f..17680aa 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -322,6 +322,7 @@ static const struct of_device_id imx2_wdt_dt_ids[] = {
> { .compatible = "fsl,imx21-wdt", },
> { /* sentinel */ }
> };
> +MODULE_DEVICE_TABLE(of, imx2_wdt_dt_ids);
>
> static struct platform_driver imx2_wdt_driver = {
> .remove = __exit_p(imx2_wdt_remove),

This has been added to linux-watchdog-next.

Kind regards,
Wim.