提交 4d869b03 编写于 作者: L LABBE Corentin 提交者: David S. Miller

net-next: stmmac: Convert old_link to bool

This patch convert old_link from int to bool since it store only 1 or 0
Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 afbe17a3
......@@ -104,7 +104,7 @@ struct stmmac_priv {
/* TX Queue */
struct stmmac_tx_queue tx_queue[MTL_MAX_TX_QUEUES];
int oldlink;
bool oldlink;
int speed;
int oldduplex;
unsigned int flow_ctrl;
......
......@@ -840,11 +840,11 @@ static void stmmac_adjust_link(struct net_device *dev)
if (!priv->oldlink) {
new_state = true;
priv->oldlink = 1;
priv->oldlink = true;
}
} else if (priv->oldlink) {
new_state = true;
priv->oldlink = 0;
priv->oldlink = false;
priv->speed = SPEED_UNKNOWN;
priv->oldduplex = DUPLEX_UNKNOWN;
}
......@@ -907,7 +907,7 @@ static int stmmac_init_phy(struct net_device *dev)
char bus_id[MII_BUS_ID_SIZE];
int interface = priv->plat->interface;
int max_speed = priv->plat->max_speed;
priv->oldlink = 0;
priv->oldlink = false;
priv->speed = SPEED_UNKNOWN;
priv->oldduplex = DUPLEX_UNKNOWN;
......@@ -4291,7 +4291,7 @@ int stmmac_suspend(struct device *dev)
}
spin_unlock_irqrestore(&priv->lock, flags);
priv->oldlink = 0;
priv->oldlink = false;
priv->speed = SPEED_UNKNOWN;
priv->oldduplex = DUPLEX_UNKNOWN;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册