diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 70966330f44..51b3b68528e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -833,8 +833,9 @@ static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) | |||
833 | 833 | ||
834 | /** | 834 | /** |
835 | * stmmac_selec_desc_mode | 835 | * stmmac_selec_desc_mode |
836 | * @dev : device pointer | 836 | * @priv : private structure |
837 | * Description: select the Enhanced/Alternate or Normal descriptors */ | 837 | * Description: select the Enhanced/Alternate or Normal descriptors |
838 | */ | ||
838 | static void stmmac_selec_desc_mode(struct stmmac_priv *priv) | 839 | static void stmmac_selec_desc_mode(struct stmmac_priv *priv) |
839 | { | 840 | { |
840 | if (priv->plat->enh_desc) { | 841 | if (priv->plat->enh_desc) { |
@@ -1861,6 +1862,8 @@ static int stmmac_hw_init(struct stmmac_priv *priv) | |||
1861 | /** | 1862 | /** |
1862 | * stmmac_dvr_probe | 1863 | * stmmac_dvr_probe |
1863 | * @device: device pointer | 1864 | * @device: device pointer |
1865 | * @plat_dat: platform data pointer | ||
1866 | * @addr: iobase memory address | ||
1864 | * Description: this is the main probe function used to | 1867 | * Description: this is the main probe function used to |
1865 | * call the alloc_etherdev, allocate the priv structure. | 1868 | * call the alloc_etherdev, allocate the priv structure. |
1866 | */ | 1869 | */ |
@@ -2090,6 +2093,34 @@ int stmmac_restore(struct net_device *ndev) | |||
2090 | } | 2093 | } |
2091 | #endif /* CONFIG_PM */ | 2094 | #endif /* CONFIG_PM */ |
2092 | 2095 | ||
2096 | /* Driver can be configured w/ and w/ both PCI and Platf drivers | ||
2097 | * depending on the configuration selected. | ||
2098 | */ | ||
2099 | static int __init stmmac_init(void) | ||
2100 | { | ||
2101 | int err_plt = 0; | ||
2102 | int err_pci = 0; | ||
2103 | |||
2104 | err_plt = stmmac_register_platform(); | ||
2105 | err_pci = stmmac_register_pci(); | ||
2106 | |||
2107 | if ((err_pci) && (err_plt)) { | ||
2108 | pr_err("stmmac: driver registration failed\n"); | ||
2109 | return -EINVAL; | ||
2110 | } | ||
2111 | |||
2112 | return 0; | ||
2113 | } | ||
2114 | |||
2115 | static void __exit stmmac_exit(void) | ||
2116 | { | ||
2117 | stmmac_unregister_platform(); | ||
2118 | stmmac_unregister_pci(); | ||
2119 | } | ||
2120 | |||
2121 | module_init(stmmac_init); | ||
2122 | module_exit(stmmac_exit); | ||
2123 | |||
2093 | #ifndef MODULE | 2124 | #ifndef MODULE |
2094 | static int __init stmmac_cmdline_opt(char *str) | 2125 | static int __init stmmac_cmdline_opt(char *str) |
2095 | { | 2126 | { |