Commit e72701ac authored by Anton Vorontsov's avatar Anton Vorontsov Committed by David S. Miller

net: Fix OF platform drivers coldplug/hotplug when compiled as modules

Some OF platform drivers are missing module device tables, so they won't
load automatically on boot. This patch fixes the issue by adding proper
MODULE_DEVICE_TABLE() macros to the drivers.
Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fe7463a
...@@ -213,6 +213,7 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = { ...@@ -213,6 +213,7 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = {
{.compatible = "nxp,sja1000"}, {.compatible = "nxp,sja1000"},
{}, {},
}; };
MODULE_DEVICE_TABLE(of, sja1000_ofp_table);
static struct of_platform_driver sja1000_ofp_driver = { static struct of_platform_driver sja1000_ofp_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -155,6 +155,7 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = { ...@@ -155,6 +155,7 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = {
{ .compatible = "mpc5200b-fec-phy", }, { .compatible = "mpc5200b-fec-phy", },
{} {}
}; };
MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match);
struct of_platform_driver mpc52xx_fec_mdio_driver = { struct of_platform_driver mpc52xx_fec_mdio_driver = {
.name = "mpc5200b-fec-phy", .name = "mpc5200b-fec-phy",
......
...@@ -1110,6 +1110,7 @@ static struct of_device_id fs_enet_match[] = { ...@@ -1110,6 +1110,7 @@ static struct of_device_id fs_enet_match[] = {
#endif #endif
{} {}
}; };
MODULE_DEVICE_TABLE(of, fs_enet_match);
static struct of_platform_driver fs_enet_driver = { static struct of_platform_driver fs_enet_driver = {
.name = "fs_enet", .name = "fs_enet",
......
...@@ -221,6 +221,7 @@ static struct of_device_id fs_enet_mdio_bb_match[] = { ...@@ -221,6 +221,7 @@ static struct of_device_id fs_enet_mdio_bb_match[] = {
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match);
static struct of_platform_driver fs_enet_bb_mdio_driver = { static struct of_platform_driver fs_enet_bb_mdio_driver = {
.name = "fsl-bb-mdio", .name = "fsl-bb-mdio",
......
...@@ -219,6 +219,7 @@ static struct of_device_id fs_enet_mdio_fec_match[] = { ...@@ -219,6 +219,7 @@ static struct of_device_id fs_enet_mdio_fec_match[] = {
#endif #endif
{}, {},
}; };
MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
static struct of_platform_driver fs_enet_fec_mdio_driver = { static struct of_platform_driver fs_enet_fec_mdio_driver = {
.name = "fsl-fec-mdio", .name = "fsl-fec-mdio",
......
...@@ -407,6 +407,7 @@ static struct of_device_id fsl_pq_mdio_match[] = { ...@@ -407,6 +407,7 @@ static struct of_device_id fsl_pq_mdio_match[] = {
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match);
static struct of_platform_driver fsl_pq_mdio_driver = { static struct of_platform_driver fsl_pq_mdio_driver = {
.name = "fsl-pq_mdio", .name = "fsl-pq_mdio",
......
...@@ -2325,9 +2325,6 @@ static irqreturn_t gfar_error(int irq, void *dev_id) ...@@ -2325,9 +2325,6 @@ static irqreturn_t gfar_error(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:fsl-gianfar");
static struct of_device_id gfar_match[] = static struct of_device_id gfar_match[] =
{ {
{ {
...@@ -2336,6 +2333,7 @@ static struct of_device_id gfar_match[] = ...@@ -2336,6 +2333,7 @@ static struct of_device_id gfar_match[] =
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, gfar_match);
/* Structure for a device driver */ /* Structure for a device driver */
static struct of_platform_driver gfar_driver = { static struct of_platform_driver gfar_driver = {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* *
*/ */
#include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -2988,6 +2989,7 @@ static struct of_device_id emac_match[] = ...@@ -2988,6 +2989,7 @@ static struct of_device_id emac_match[] =
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, emac_match);
static struct of_platform_driver emac_driver = { static struct of_platform_driver emac_driver = {
.name = "emac", .name = "emac",
......
...@@ -238,6 +238,7 @@ static struct of_device_id mdio_ofgpio_match[] = { ...@@ -238,6 +238,7 @@ static struct of_device_id mdio_ofgpio_match[] = {
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, mdio_ofgpio_match);
static struct of_platform_driver mdio_ofgpio_driver = { static struct of_platform_driver mdio_ofgpio_driver = {
.name = "mdio-gpio", .name = "mdio-gpio",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment