linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries
@ 2018-03-26 10:07 sean.wang
  2018-03-26 10:07 ` [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers sean.wang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: sean.wang @ 2018-03-26 10:07 UTC (permalink / raw)
  To: davem, andrew, f.fainelli, vivien.didelot
  Cc: netdev, linux-kernel, linux-mediatek, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

MODULE_ALIAS exports information to allow the module to be auto-loaded at
boot for the drivers registered using legacy platform registration.

However, currently the driver is always used by DT-only platform,
MODULE_ALIAS is redundant and should be removed properly.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/dsa/mt7530.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 8a0bb00..d31246c 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1424,4 +1424,3 @@ mdio_module_driver(mt7530_mdio_driver);
 MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
 MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:mediatek-mt7530");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers
  2018-03-26 10:07 [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries sean.wang
@ 2018-03-26 10:07 ` sean.wang
  2018-03-26 17:10   ` David Miller
  2018-03-26 15:32 ` [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries Andrew Lunn
  2018-03-26 17:09 ` David Miller
  2 siblings, 1 reply; 5+ messages in thread
From: sean.wang @ 2018-03-26 10:07 UTC (permalink / raw)
  To: davem, andrew, f.fainelli, vivien.didelot
  Cc: netdev, linux-kernel, linux-mediatek, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

It's required to create a modules.alias via MODULE_DEVICE_TABLE helper
for the OF platform driver. Otherwise, module autoloading cannot work.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/dsa/mt7530.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index d31246c..4e53c5c 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1409,6 +1409,7 @@ static const struct of_device_id mt7530_of_match[] = {
 	{ .compatible = "mediatek,mt7530" },
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, mt7530_of_match);
 
 static struct mdio_driver mt7530_mdio_driver = {
 	.probe  = mt7530_probe,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries
  2018-03-26 10:07 [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries sean.wang
  2018-03-26 10:07 ` [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers sean.wang
@ 2018-03-26 15:32 ` Andrew Lunn
  2018-03-26 17:09 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2018-03-26 15:32 UTC (permalink / raw)
  To: sean.wang
  Cc: davem, f.fainelli, vivien.didelot, netdev, linux-kernel, linux-mediatek

On Mon, Mar 26, 2018 at 06:07:09PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> MODULE_ALIAS exports information to allow the module to be auto-loaded at
> boot for the drivers registered using legacy platform registration.
> 
> However, currently the driver is always used by DT-only platform,
> MODULE_ALIAS is redundant and should be removed properly.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

For this, and the second patch:

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries
  2018-03-26 10:07 [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries sean.wang
  2018-03-26 10:07 ` [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers sean.wang
  2018-03-26 15:32 ` [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries Andrew Lunn
@ 2018-03-26 17:09 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-03-26 17:09 UTC (permalink / raw)
  To: sean.wang
  Cc: andrew, f.fainelli, vivien.didelot, netdev, linux-kernel, linux-mediatek

From: <sean.wang@mediatek.com>
Date: Mon, 26 Mar 2018 18:07:09 +0800

> From: Sean Wang <sean.wang@mediatek.com>
> 
> MODULE_ALIAS exports information to allow the module to be auto-loaded at
> boot for the drivers registered using legacy platform registration.
> 
> However, currently the driver is always used by DT-only platform,
> MODULE_ALIAS is redundant and should be removed properly.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers
  2018-03-26 10:07 ` [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers sean.wang
@ 2018-03-26 17:10   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-03-26 17:10 UTC (permalink / raw)
  To: sean.wang
  Cc: andrew, f.fainelli, vivien.didelot, netdev, linux-kernel, linux-mediatek

From: <sean.wang@mediatek.com>
Date: Mon, 26 Mar 2018 18:07:10 +0800

> From: Sean Wang <sean.wang@mediatek.com>
> 
> It's required to create a modules.alias via MODULE_DEVICE_TABLE helper
> for the OF platform driver. Otherwise, module autoloading cannot work.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-26 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 10:07 [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries sean.wang
2018-03-26 10:07 ` [PATCH net 2/2] net: dsa: mt7530: fix module autoloading for OF platform drivers sean.wang
2018-03-26 17:10   ` David Miller
2018-03-26 15:32 ` [PATCH net 1/2] net: dsa: mt7530: remove redundant MODULE_ALIAS entries Andrew Lunn
2018-03-26 17:09 ` David Miller

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).