Skip to content

Commit

Permalink
Merge branch 'net-of-autoload'
Browse files Browse the repository at this point in the history
Luis de Bethencourt says:

====================
net: Fix module autoload for OF platform drivers

These patches add the missing MODULE_DEVICE_TABLE() for OF to export
the information so modules have the correct aliases built-in and
autoloading works correctly.

A longer explanation by Javier Canillas can be found here:
https://lkml.org/lkml/2015/7/30/519
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 21, 2015
2 parents 1f770c0 + ebd8ebf commit a11d558
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/arc/emac_arc.c
Original file line number Diff line number Diff line change
@@ -78,6 +78,7 @@ static const struct of_device_id emac_arc_dt_ids[] = {
{ .compatible = "snps,arc-emac" },
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(of, emac_arc_dt_ids);

static struct platform_driver emac_arc_driver = {
.probe = emac_arc_probe,
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
@@ -2079,6 +2079,7 @@ static const struct of_device_id bcm_sysport_of_match[] = {
{ .compatible = "brcm,systemport" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, bcm_sysport_of_match);

static struct platform_driver bcm_sysport_driver = {
.probe = bcm_sysport_probe,
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
@@ -3155,6 +3155,7 @@ static const struct of_device_id bcmgenet_match[] = {
{ .compatible = "brcm,genet-v4", .data = (void *)GENET_V4 },
{ },
};
MODULE_DEVICE_TABLE(of, bcmgenet_match);

static int bcmgenet_probe(struct platform_device *pdev)
{
1 change: 1 addition & 0 deletions drivers/net/ethernet/freescale/gianfar_ptp.c
Original file line number Diff line number Diff line change
@@ -557,6 +557,7 @@ static const struct of_device_id match_table[] = {
{ .compatible = "fsl,etsec-ptp" },
{},
};
MODULE_DEVICE_TABLE(of, match_table);

static struct platform_driver gianfar_ptp_driver = {
.driver = {
1 change: 1 addition & 0 deletions drivers/net/ethernet/moxa/moxart_ether.c
Original file line number Diff line number Diff line change
@@ -552,6 +552,7 @@ static const struct of_device_id moxart_mac_match[] = {
{ .compatible = "moxa,moxart-mac" },
{ }
};
MODULE_DEVICE_TABLE(of, moxart_mac_match);

static struct platform_driver moxart_mac_driver = {
.probe = moxart_mac_probe,

0 comments on commit a11d558

Please sign in to comment.