r8152: move r8152b_get_version
authorhayeswang <hayeswang@realtek.com>
Thu, 6 Nov 2014 04:47:38 +0000 (12:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Nov 2014 20:14:30 +0000 (15:14 -0500)
Move r8152b_get_version() to the location before rtl_ops_init().
Then, the rtl_ops_init() could use tp->version.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c

index fd41675bc038b85306de8588f3c2ae307af3cbd7..4b6db8afea714d3af3772ff0a5c6b77ea0d7fdcf 100644 (file)
@@ -3833,6 +3833,7 @@ static int rtl8152_probe(struct usb_interface *intf,
        tp->netdev = netdev;
        tp->intf = intf;
 
+       r8152b_get_version(tp);
        ret = rtl_ops_init(tp, id);
        if (ret)
                goto out;
@@ -3866,11 +3867,9 @@ static int rtl8152_probe(struct usb_interface *intf,
        tp->mii.phy_id_mask = 0x3f;
        tp->mii.reg_num_mask = 0x1f;
        tp->mii.phy_id = R8152_PHY_ID;
-       tp->mii.supports_gmii = 0;
 
        intf->needs_remote_wakeup = 1;
 
-       r8152b_get_version(tp);
        tp->rtl_ops.init(tp);
        set_ethernet_addr(tp);