net: Fix OF platform drivers coldplug/hotplug when compiled as modules
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Wed, 14 Oct 2009 21:54:52 +0000 (14:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Oct 2009 21:54:52 +0000 (14:54 -0700)
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: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/sja1000/sja1000_of_platform.c
drivers/net/fec_mpc52xx_phy.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/fsl_pq_mdio.c
drivers/net/gianfar.c
drivers/net/ibm_newemac/core.c
drivers/net/phy/mdio-gpio.c

index 3373560405ba3a2acafa4997a604b951bc5adb48..9dd076a626a5b329b1ff368f3682daabe516acd9 100644 (file)
@@ -213,6 +213,7 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = {
        {.compatible = "nxp,sja1000"},
        {},
 };
+MODULE_DEVICE_TABLE(of, sja1000_ofp_table);
 
 static struct of_platform_driver sja1000_ofp_driver = {
        .owner = THIS_MODULE,
index 31e6d62b785d81beb13ea7b4f76792975a385127..ee0f3c6d3f888e636c6da076a83d5b3ac4187d72 100644 (file)
@@ -155,6 +155,7 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = {
        { .compatible = "mpc5200b-fec-phy", },
        {}
 };
+MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match);
 
 struct of_platform_driver mpc52xx_fec_mdio_driver = {
        .name = "mpc5200b-fec-phy",
index 2bc2d2b20644ba924f0031c512b9a8468cc46fa0..ec2f5034457f7b58099906633928456f91fabf05 100644 (file)
@@ -1110,6 +1110,7 @@ static struct of_device_id fs_enet_match[] = {
 #endif
        {}
 };
+MODULE_DEVICE_TABLE(of, fs_enet_match);
 
 static struct of_platform_driver fs_enet_driver = {
        .name   = "fs_enet",
index 93b481b0e3c7faf7bec15bae910d090478be4efa..24ff9f43a62b4e6378da3f231b280e75258bfce9 100644 (file)
@@ -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 = {
        .name = "fsl-bb-mdio",
index a2d69c1cd07e311113a11d74ded63d883f584430..96eba4280c5caaaa36ce7b5b1a738e06200769c4 100644 (file)
@@ -219,6 +219,7 @@ static struct of_device_id fs_enet_mdio_fec_match[] = {
 #endif
        {},
 };
+MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
 
 static struct of_platform_driver fs_enet_fec_mdio_driver = {
        .name = "fsl-fec-mdio",
index d167090248e2f31d6ba7211e447e3bd68dc43da6..6ac4648669728421b934d32646ffbb6261283876 100644 (file)
@@ -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 = {
        .name = "fsl-pq_mdio",
index 1e5289ffef6fdda0ce8fd75f92f77f057d860689..5bf31f1509c93acca119f3e87175f97505bd4d31 100644 (file)
@@ -2325,9 +2325,6 @@ static irqreturn_t gfar_error(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-/* work with hotplug and coldplug */
-MODULE_ALIAS("platform:fsl-gianfar");
-
 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 */
 static struct of_platform_driver gfar_driver = {
index c6591cb0aae00d052d95e11a14f42c03fecaa6ed..3fae875597914b4fafd64550b5e8ab16cb2648f8 100644 (file)
@@ -24,6 +24,7 @@
  *
  */
 
+#include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/errno.h>
@@ -2988,6 +2989,7 @@ static struct of_device_id emac_match[] =
        },
        {},
 };
+MODULE_DEVICE_TABLE(of, emac_match);
 
 static struct of_platform_driver emac_driver = {
        .name = "emac",
index 250e10f2c35bb083519efe6f76ce778c6ad11420..8659d341e7696fcfe8df1b55318db5957181d013 100644 (file)
@@ -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 = {
        .name = "mdio-gpio",