Skip to content

Commit 402dae0

Browse files
manabiandavem330
authored andcommitted
stmmac: export probe_config_dt() and get_platform_resources()
Export stmmac_probe_config_dt() and stmmac_get_platform_resources() so they can be used in the dwmac-* drivers themselves. This will allow us to build more flexible and standalone drivers which just use stmmac_platform as a library for setup functions. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b0003ea commit 402dae0

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)
104104
* this function is to read the driver parameters from device-tree and
105105
* set some private fields that will be used by the main at runtime.
106106
*/
107-
static struct plat_stmmacenet_data *
107+
struct plat_stmmacenet_data *
108108
stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
109109
{
110110
struct device_node *np = pdev->dev.of_node;
@@ -251,15 +251,16 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
251251
return plat;
252252
}
253253
#else
254-
static struct plat_stmmacenet_data *
254+
struct plat_stmmacenet_data *
255255
stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
256256
{
257257
return ERR_PTR(-ENOSYS);
258258
}
259259
#endif /* CONFIG_OF */
260+
EXPORT_SYMBOL_GPL(stmmac_probe_config_dt);
260261

261-
static int stmmac_get_platform_resources(struct platform_device *pdev,
262-
struct stmmac_resources *stmmac_res)
262+
int stmmac_get_platform_resources(struct platform_device *pdev,
263+
struct stmmac_resources *stmmac_res)
263264
{
264265
struct resource *res;
265266

@@ -302,6 +303,7 @@ static int stmmac_get_platform_resources(struct platform_device *pdev,
302303

303304
return 0;
304305
}
306+
EXPORT_SYMBOL_GPL(stmmac_get_platform_resources);
305307

306308
/**
307309
* stmmac_pltfr_probe - platform driver probe.

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919
#ifndef __STMMAC_PLATFORM_H__
2020
#define __STMMAC_PLATFORM_H__
2121

22+
#include "stmmac.h"
23+
24+
struct plat_stmmacenet_data *
25+
stmmac_probe_config_dt(struct platform_device *pdev, const char **mac);
26+
27+
int stmmac_get_platform_resources(struct platform_device *pdev,
28+
struct stmmac_resources *stmmac_res);
29+
2230
int stmmac_pltfr_probe(struct platform_device *pdev);
2331
int stmmac_pltfr_remove(struct platform_device *pdev);
2432
extern const struct dev_pm_ops stmmac_pltfr_pm_ops;

0 commit comments

Comments
 (0)