Skip to content

Commit

Permalink
stmmac: export probe_config_dt() and get_platform_resources()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joachim Eastwood authored and David S. Miller committed Jul 21, 2015
1 parent b0003ea commit 402dae0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)
* this function is to read the driver parameters from device-tree and
* set some private fields that will be used by the main at runtime.
*/
static struct plat_stmmacenet_data *
struct plat_stmmacenet_data *
stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
{
struct device_node *np = pdev->dev.of_node;
Expand Down Expand Up @@ -251,15 +251,16 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
return plat;
}
#else
static struct plat_stmmacenet_data *
struct plat_stmmacenet_data *
stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
{
return ERR_PTR(-ENOSYS);
}
#endif /* CONFIG_OF */
EXPORT_SYMBOL_GPL(stmmac_probe_config_dt);

static int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res)
int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res)
{
struct resource *res;

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

return 0;
}
EXPORT_SYMBOL_GPL(stmmac_get_platform_resources);

/**
* stmmac_pltfr_probe - platform driver probe.
Expand Down
8 changes: 8 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
#ifndef __STMMAC_PLATFORM_H__
#define __STMMAC_PLATFORM_H__

#include "stmmac.h"

struct plat_stmmacenet_data *
stmmac_probe_config_dt(struct platform_device *pdev, const char **mac);

int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res);

int stmmac_pltfr_probe(struct platform_device *pdev);
int stmmac_pltfr_remove(struct platform_device *pdev);
extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
Expand Down

0 comments on commit 402dae0

Please sign in to comment.