Skip to content

Commit

Permalink
drivers/net/ftgmac100: refactor ftgmac100_reset_task to enable direct…
Browse files Browse the repository at this point in the history
… function call

This is to prepare for ftgmac100_adjust_link() to call reset function
directly, instead of task schedule.

Signed-off-by: Heyi Guo <guoheyi@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heyi Guo authored and David S. Miller committed Feb 23, 2022
1 parent ecf4a24 commit 4f1e728
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions drivers/net/ethernet/faraday/ftgmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,10 +1410,8 @@ static int ftgmac100_init_all(struct ftgmac100 *priv, bool ignore_alloc_err)
return err;
}

static void ftgmac100_reset_task(struct work_struct *work)
static void ftgmac100_reset(struct ftgmac100 *priv)
{
struct ftgmac100 *priv = container_of(work, struct ftgmac100,
reset_task);
struct net_device *netdev = priv->netdev;
int err;

Expand Down Expand Up @@ -1459,6 +1457,14 @@ static void ftgmac100_reset_task(struct work_struct *work)
rtnl_unlock();
}

static void ftgmac100_reset_task(struct work_struct *work)
{
struct ftgmac100 *priv = container_of(work, struct ftgmac100,
reset_task);

ftgmac100_reset(priv);
}

static int ftgmac100_open(struct net_device *netdev)
{
struct ftgmac100 *priv = netdev_priv(netdev);
Expand Down

0 comments on commit 4f1e728

Please sign in to comment.