aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2015-07-28 18:08:57 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-29 03:13:24 -0400
commit85d89e6115cd5613b36f31a5038feb9cb4e13dfc (patch)
tree4aa6a3efb5f68da18c76b9b1c6a6c43c15a20622 /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
parent27ffefd2d10902352c01394169e577f3b91113f2 (diff)
stmmac: move stmmac_pltfr_probe into dwmac-generic
As all dwmac-* drivers now have their own probe function move the common one into dwmac-generic driver and drop the EXPORT. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 1dcb5ebefe5c..9c49d95e529a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -304,61 +304,6 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
304EXPORT_SYMBOL_GPL(stmmac_get_platform_resources); 304EXPORT_SYMBOL_GPL(stmmac_get_platform_resources);
305 305
306/** 306/**
307 * stmmac_pltfr_probe - platform driver probe.
308 * @pdev: platform device pointer
309 * Description: platform_device probe function. It is to allocate
310 * the necessary platform resources, invoke custom helper (if required) and
311 * invoke the main probe function.
312 */
313int stmmac_pltfr_probe(struct platform_device *pdev)
314{
315 struct plat_stmmacenet_data *plat_dat;
316 struct stmmac_resources stmmac_res;
317 int ret;
318
319 ret = stmmac_get_platform_resources(pdev, &stmmac_res);
320 if (ret)
321 return ret;
322
323 if (pdev->dev.of_node) {
324 plat_dat = stmmac_probe_config_dt(pdev, &stmmac_res.mac);
325 if (IS_ERR(plat_dat)) {
326 dev_err(&pdev->dev, "dt configuration failed\n");
327 return PTR_ERR(plat_dat);
328 }
329 } else {
330 plat_dat = dev_get_platdata(&pdev->dev);
331 if (!plat_dat) {
332 dev_err(&pdev->dev, "no platform data provided\n");
333 return -EINVAL;
334 }
335
336 /* Set default value for multicast hash bins */
337 plat_dat->multicast_filter_bins = HASH_TABLE_SIZE;
338
339 /* Set default value for unicast filter entries */
340 plat_dat->unicast_filter_entries = 1;
341 }
342
343 /* Custom setup (if needed) */
344 if (plat_dat->setup) {
345 plat_dat->bsp_priv = plat_dat->setup(pdev);
346 if (IS_ERR(plat_dat->bsp_priv))
347 return PTR_ERR(plat_dat->bsp_priv);
348 }
349
350 /* Custom initialisation (if needed)*/
351 if (plat_dat->init) {
352 ret = plat_dat->init(pdev, plat_dat->bsp_priv);
353 if (unlikely(ret))
354 return ret;
355 }
356
357 return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
358}
359EXPORT_SYMBOL_GPL(stmmac_pltfr_probe);
360
361/**
362 * stmmac_pltfr_remove 307 * stmmac_pltfr_remove
363 * @pdev: platform device pointer 308 * @pdev: platform device pointer
364 * Description: this function calls the main to free the net resources 309 * Description: this function calls the main to free the net resources