提交 7a126a43 编写于 作者: R Roi Dayan 提交者: Saeed Mahameed

net: Change dev parameter to const in netif_device_present()

Not all ndos check the present bit before calling the ndo and the driver
may want to check it. Sometimes the dev parameter passed as const so we
pass it to netif_device_present() as const.
Since netif_device_present() doesn't modify dev parameter anyway, declare
it as const.
Signed-off-by: NRoi Dayan <roid@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 5a30833b
...@@ -4175,7 +4175,7 @@ static inline bool netif_oper_up(const struct net_device *dev) ...@@ -4175,7 +4175,7 @@ static inline bool netif_oper_up(const struct net_device *dev)
* *
* Check if device has not been removed from system. * Check if device has not been removed from system.
*/ */
static inline bool netif_device_present(struct net_device *dev) static inline bool netif_device_present(const struct net_device *dev)
{ {
return test_bit(__LINK_STATE_PRESENT, &dev->state); return test_bit(__LINK_STATE_PRESENT, &dev->state);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册