Skip to content

Commit

Permalink
stmmac: dwmac-ipq806x: move ipq806x_gmac_fix_mac_speed function
Browse files Browse the repository at this point in the history
Move ipq806x_gmac_fix_mac_speed in preparation for turning
the setup glue callback in a proper probe function.

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 29, 2015
1 parent a04c0ae commit 213088f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ static void *ipq806x_gmac_of_parse(struct ipq806x_gmac *gmac)
return NULL;
}

static void ipq806x_gmac_fix_mac_speed(void *priv, unsigned int speed)
{
struct ipq806x_gmac *gmac = priv;

ipq806x_gmac_set_speed(gmac, speed);
}

static void *ipq806x_gmac_setup(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
Expand Down Expand Up @@ -330,13 +337,6 @@ static void *ipq806x_gmac_setup(struct platform_device *pdev)
return gmac;
}

static void ipq806x_gmac_fix_mac_speed(void *priv, unsigned int speed)
{
struct ipq806x_gmac *gmac = priv;

ipq806x_gmac_set_speed(gmac, speed);
}

static const struct stmmac_of_data ipq806x_gmac_data = {
.has_gmac = 1,
.setup = ipq806x_gmac_setup,
Expand Down

0 comments on commit 213088f

Please sign in to comment.