Skip to content

Commit 4f1e728

Browse files
iwishguodavem330
authored andcommitted
drivers/net/ftgmac100: refactor ftgmac100_reset_task to enable direct 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>
1 parent ecf4a24 commit 4f1e728

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,10 +1410,8 @@ static int ftgmac100_init_all(struct ftgmac100 *priv, bool ignore_alloc_err)
14101410
return err;
14111411
}
14121412

1413-
static void ftgmac100_reset_task(struct work_struct *work)
1413+
static void ftgmac100_reset(struct ftgmac100 *priv)
14141414
{
1415-
struct ftgmac100 *priv = container_of(work, struct ftgmac100,
1416-
reset_task);
14171415
struct net_device *netdev = priv->netdev;
14181416
int err;
14191417

@@ -1459,6 +1457,14 @@ static void ftgmac100_reset_task(struct work_struct *work)
14591457
rtnl_unlock();
14601458
}
14611459

1460+
static void ftgmac100_reset_task(struct work_struct *work)
1461+
{
1462+
struct ftgmac100 *priv = container_of(work, struct ftgmac100,
1463+
reset_task);
1464+
1465+
ftgmac100_reset(priv);
1466+
}
1467+
14621468
static int ftgmac100_open(struct net_device *netdev)
14631469
{
14641470
struct ftgmac100 *priv = netdev_priv(netdev);

0 commit comments

Comments
 (0)