Patchwork [1/4] net/ti: add MODULE_DEVICE_TABLE + MODULE_LICENSE

login
register
mail settings
Submitter Sebastian Siewior
Date April 24, 2013, 6:48 p.m.
Message ID <1366829305-9752-2-git-send-email-bigeasy@linutronix.de>
Download mbox | patch
Permalink /patch/239291/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sebastian Siewior - April 24, 2013, 6:48 p.m.
If compiled as modules each one of these modules is missing something.
With this patch the modules are loaded on demand and don't taint the
kernel due to license issues.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/ethernet/ti/cpsw.c          |    1 +
 drivers/net/ethernet/ti/davinci_cpdma.c |    2 ++
 drivers/net/ethernet/ti/davinci_mdio.c  |    1 +
 3 files changed, 4 insertions(+)
Mugunthan V N - April 25, 2013, 6:29 a.m.
On 4/25/2013 12:18 AM, Sebastian Andrzej Siewior wrote:
> If compiled as modules each one of these modules is missing something.
> With this patch the modules are loaded on demand and don't taint the
> kernel due to license issues.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>   drivers/net/ethernet/ti/cpsw.c          |    1 +
>   drivers/net/ethernet/ti/davinci_cpdma.c |    2 ++
>   drivers/net/ethernet/ti/davinci_mdio.c  |    1 +
>   3 files changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 81cec00..f91c8ab 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -1974,6 +1974,7 @@ static const struct of_device_id cpsw_of_mtable[] = {
>   	{ .compatible = "ti,cpsw", },
>   	{ /* sentinel */ },
>   };
> +MODULE_DEVICE_TABLE(of, cpsw_of_mtable);
>   
>   static struct platform_driver cpsw_driver = {
>   	.driver = {
> diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
> index 6b0a89f..49dfd59 100644
> --- a/drivers/net/ethernet/ti/davinci_cpdma.c
> +++ b/drivers/net/ethernet/ti/davinci_cpdma.c
> @@ -1040,3 +1040,5 @@ int cpdma_control_set(struct cpdma_ctlr *ctlr, int control, int value)
>   	return ret;
>   }
>   EXPORT_SYMBOL_GPL(cpdma_control_set);
> +
> +MODULE_LICENSE("GPL");
> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
> index d04a622..12aec17 100644
> --- a/drivers/net/ethernet/ti/davinci_mdio.c
> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
> @@ -485,6 +485,7 @@ static const struct of_device_id davinci_mdio_of_mtable[] = {
>   	{ .compatible = "ti,davinci_mdio", },
>   	{ /* sentinel */ },
>   };
> +MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
>   
>   static struct platform_driver davinci_mdio_driver = {
>   	.driver = {

Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 81cec00..f91c8ab 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1974,6 +1974,7 @@  static const struct of_device_id cpsw_of_mtable[] = {
 	{ .compatible = "ti,cpsw", },
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, cpsw_of_mtable);
 
 static struct platform_driver cpsw_driver = {
 	.driver = {
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index 6b0a89f..49dfd59 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -1040,3 +1040,5 @@  int cpdma_control_set(struct cpdma_ctlr *ctlr, int control, int value)
 	return ret;
 }
 EXPORT_SYMBOL_GPL(cpdma_control_set);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index d04a622..12aec17 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -485,6 +485,7 @@  static const struct of_device_id davinci_mdio_of_mtable[] = {
 	{ .compatible = "ti,davinci_mdio", },
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
 
 static struct platform_driver davinci_mdio_driver = {
 	.driver = {