r8169: drop member pll_power_ops from struct rtl8169_private
After merging r810x_pll_power_down/up and r8168_pll_power_down/up we don't need member pll_power_ops any longer and can drop it, thus simplifying the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
73570bf19f
commit
4f447d2969
@ -776,11 +776,6 @@ struct rtl8169_private {
|
||||
int (*read)(struct rtl8169_private *, int);
|
||||
} mdio_ops;
|
||||
|
||||
struct pll_power_ops {
|
||||
void (*down)(struct rtl8169_private *);
|
||||
void (*up)(struct rtl8169_private *);
|
||||
} pll_power_ops;
|
||||
|
||||
struct jumbo_ops {
|
||||
void (*enable)(struct rtl8169_private *);
|
||||
void (*disable)(struct rtl8169_private *);
|
||||
@ -4871,73 +4866,23 @@ static void rtl_generic_op(struct rtl8169_private *tp,
|
||||
|
||||
static void rtl_pll_power_down(struct rtl8169_private *tp)
|
||||
{
|
||||
rtl_generic_op(tp, tp->pll_power_ops.down);
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_01 ... RTL_GIGA_MAC_VER_06:
|
||||
case RTL_GIGA_MAC_VER_13 ... RTL_GIGA_MAC_VER_15:
|
||||
break;
|
||||
default:
|
||||
r8168_pll_power_down(tp);
|
||||
}
|
||||
}
|
||||
|
||||
static void rtl_pll_power_up(struct rtl8169_private *tp)
|
||||
{
|
||||
rtl_generic_op(tp, tp->pll_power_ops.up);
|
||||
}
|
||||
|
||||
static void rtl_init_pll_power_ops(struct rtl8169_private *tp)
|
||||
{
|
||||
struct pll_power_ops *ops = &tp->pll_power_ops;
|
||||
|
||||
switch (tp->mac_version) {
|
||||
case RTL_GIGA_MAC_VER_07:
|
||||
case RTL_GIGA_MAC_VER_08:
|
||||
case RTL_GIGA_MAC_VER_09:
|
||||
case RTL_GIGA_MAC_VER_10:
|
||||
case RTL_GIGA_MAC_VER_16:
|
||||
case RTL_GIGA_MAC_VER_29:
|
||||
case RTL_GIGA_MAC_VER_30:
|
||||
case RTL_GIGA_MAC_VER_37:
|
||||
case RTL_GIGA_MAC_VER_39:
|
||||
case RTL_GIGA_MAC_VER_43:
|
||||
case RTL_GIGA_MAC_VER_47:
|
||||
case RTL_GIGA_MAC_VER_48:
|
||||
ops->down = r8168_pll_power_down;
|
||||
ops->up = r8168_pll_power_up;
|
||||
case RTL_GIGA_MAC_VER_01 ... RTL_GIGA_MAC_VER_06:
|
||||
case RTL_GIGA_MAC_VER_13 ... RTL_GIGA_MAC_VER_15:
|
||||
break;
|
||||
|
||||
case RTL_GIGA_MAC_VER_11:
|
||||
case RTL_GIGA_MAC_VER_12:
|
||||
case RTL_GIGA_MAC_VER_17:
|
||||
case RTL_GIGA_MAC_VER_18:
|
||||
case RTL_GIGA_MAC_VER_19:
|
||||
case RTL_GIGA_MAC_VER_20:
|
||||
case RTL_GIGA_MAC_VER_21:
|
||||
case RTL_GIGA_MAC_VER_22:
|
||||
case RTL_GIGA_MAC_VER_23:
|
||||
case RTL_GIGA_MAC_VER_24:
|
||||
case RTL_GIGA_MAC_VER_25:
|
||||
case RTL_GIGA_MAC_VER_26:
|
||||
case RTL_GIGA_MAC_VER_27:
|
||||
case RTL_GIGA_MAC_VER_28:
|
||||
case RTL_GIGA_MAC_VER_31:
|
||||
case RTL_GIGA_MAC_VER_32:
|
||||
case RTL_GIGA_MAC_VER_33:
|
||||
case RTL_GIGA_MAC_VER_34:
|
||||
case RTL_GIGA_MAC_VER_35:
|
||||
case RTL_GIGA_MAC_VER_36:
|
||||
case RTL_GIGA_MAC_VER_38:
|
||||
case RTL_GIGA_MAC_VER_40:
|
||||
case RTL_GIGA_MAC_VER_41:
|
||||
case RTL_GIGA_MAC_VER_42:
|
||||
case RTL_GIGA_MAC_VER_44:
|
||||
case RTL_GIGA_MAC_VER_45:
|
||||
case RTL_GIGA_MAC_VER_46:
|
||||
case RTL_GIGA_MAC_VER_49:
|
||||
case RTL_GIGA_MAC_VER_50:
|
||||
case RTL_GIGA_MAC_VER_51:
|
||||
ops->down = r8168_pll_power_down;
|
||||
ops->up = r8168_pll_power_up;
|
||||
break;
|
||||
|
||||
default:
|
||||
ops->down = NULL;
|
||||
ops->up = NULL;
|
||||
break;
|
||||
r8168_pll_power_up(tp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8027,7 +7972,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
pci_set_master(pdev);
|
||||
|
||||
rtl_init_mdio_ops(tp);
|
||||
rtl_init_pll_power_ops(tp);
|
||||
rtl_init_jumbo_ops(tp);
|
||||
rtl_init_csi_ops(tp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user