Commit 82cf94cb authored by hayeswang's avatar hayeswang Committed by David S. Miller

r8152: move r8152b_get_version

Move r8152b_get_version() to the location before rtl_ops_init().
Then, the rtl_ops_init() could use tp->version.
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 926c5126
...@@ -3833,6 +3833,7 @@ static int rtl8152_probe(struct usb_interface *intf, ...@@ -3833,6 +3833,7 @@ static int rtl8152_probe(struct usb_interface *intf,
tp->netdev = netdev; tp->netdev = netdev;
tp->intf = intf; tp->intf = intf;
r8152b_get_version(tp);
ret = rtl_ops_init(tp, id); ret = rtl_ops_init(tp, id);
if (ret) if (ret)
goto out; goto out;
...@@ -3866,11 +3867,9 @@ static int rtl8152_probe(struct usb_interface *intf, ...@@ -3866,11 +3867,9 @@ static int rtl8152_probe(struct usb_interface *intf,
tp->mii.phy_id_mask = 0x3f; tp->mii.phy_id_mask = 0x3f;
tp->mii.reg_num_mask = 0x1f; tp->mii.reg_num_mask = 0x1f;
tp->mii.phy_id = R8152_PHY_ID; tp->mii.phy_id = R8152_PHY_ID;
tp->mii.supports_gmii = 0;
intf->needs_remote_wakeup = 1; intf->needs_remote_wakeup = 1;
r8152b_get_version(tp);
tp->rtl_ops.init(tp); tp->rtl_ops.init(tp);
set_ethernet_addr(tp); set_ethernet_addr(tp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment