From: Vladimir Oltean Date: Wed, 10 Jun 2026 15:19:44 +0000 (+0300) Subject: phy: lynx-28g: move struct lynx_info definitions downwards X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=9515c35eaac9fc51717c8dbb5d18ec5a923b8342;p=thirdparty%2Fkernel%2Flinux.git phy: lynx-28g: move struct lynx_info definitions downwards We need to be able to reference more function pointers in upcoming patches. The struct lynx_info definitions are currently placed a bit up in lynx-28g.c in order to be able to do that without function prototype forward declarations, so move them downward to avoid that situation. No functional change intended. Signed-off-by: Vladimir Oltean Link: https://patch.msgid.link/20260610151952.2141019-9-vladimir.oltean@nxp.com Signed-off-by: Vinod Koul --- diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c index 1de663283fafc..a3fbd31d4dbfe 100644 --- a/drivers/phy/freescale/phy-fsl-lynx-28g.c +++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c @@ -782,49 +782,6 @@ static bool lynx_28g_compat_lane_supports_mode(int lane, } } -static const struct lynx_info lynx_info_compat = { - .get_pccr = lynx_28g_get_pccr, - .get_pcvt_offset = lynx_28g_get_pcvt_offset, - .lane_supports_mode = lynx_28g_compat_lane_supports_mode, - .num_lanes = LYNX_28G_NUM_LANE, -}; - -static const struct lynx_info lynx_info_lx2160a_serdes1 = { - .get_pccr = lynx_28g_get_pccr, - .get_pcvt_offset = lynx_28g_get_pcvt_offset, - .lane_supports_mode = lx2160a_serdes1_lane_supports_mode, - .num_lanes = LYNX_28G_NUM_LANE, -}; - -static const struct lynx_info lynx_info_lx2160a_serdes2 = { - .get_pccr = lynx_28g_get_pccr, - .get_pcvt_offset = lynx_28g_get_pcvt_offset, - .lane_supports_mode = lx2160a_serdes2_lane_supports_mode, - .num_lanes = LYNX_28G_NUM_LANE, -}; - -static const struct lynx_info lynx_info_lx2160a_serdes3 = { - .get_pccr = lynx_28g_get_pccr, - .get_pcvt_offset = lynx_28g_get_pcvt_offset, - .lane_supports_mode = lx2160a_serdes3_lane_supports_mode, - .num_lanes = LYNX_28G_NUM_LANE, -}; - -static const struct lynx_info lynx_info_lx2162a_serdes1 = { - .get_pccr = lynx_28g_get_pccr, - .get_pcvt_offset = lynx_28g_get_pcvt_offset, - .lane_supports_mode = lx2162a_serdes1_lane_supports_mode, - .first_lane = 4, - .num_lanes = LYNX_28G_NUM_LANE, -}; - -static const struct lynx_info lynx_info_lx2162a_serdes2 = { - .get_pccr = lynx_28g_get_pccr, - .get_pcvt_offset = lynx_28g_get_pcvt_offset, - .lane_supports_mode = lx2162a_serdes2_lane_supports_mode, - .num_lanes = LYNX_28G_NUM_LANE, -}; - static void lynx_28g_lane_remap_pll(struct lynx_lane *lane, enum lynx_lane_mode lane_mode) { @@ -1248,6 +1205,49 @@ static int lynx_28g_probe_lane(struct lynx_28g_priv *priv, int id, return 0; } +static const struct lynx_info lynx_info_compat = { + .get_pccr = lynx_28g_get_pccr, + .get_pcvt_offset = lynx_28g_get_pcvt_offset, + .lane_supports_mode = lynx_28g_compat_lane_supports_mode, + .num_lanes = LYNX_28G_NUM_LANE, +}; + +static const struct lynx_info lynx_info_lx2160a_serdes1 = { + .get_pccr = lynx_28g_get_pccr, + .get_pcvt_offset = lynx_28g_get_pcvt_offset, + .lane_supports_mode = lx2160a_serdes1_lane_supports_mode, + .num_lanes = LYNX_28G_NUM_LANE, +}; + +static const struct lynx_info lynx_info_lx2160a_serdes2 = { + .get_pccr = lynx_28g_get_pccr, + .get_pcvt_offset = lynx_28g_get_pcvt_offset, + .lane_supports_mode = lx2160a_serdes2_lane_supports_mode, + .num_lanes = LYNX_28G_NUM_LANE, +}; + +static const struct lynx_info lynx_info_lx2160a_serdes3 = { + .get_pccr = lynx_28g_get_pccr, + .get_pcvt_offset = lynx_28g_get_pcvt_offset, + .lane_supports_mode = lx2160a_serdes3_lane_supports_mode, + .num_lanes = LYNX_28G_NUM_LANE, +}; + +static const struct lynx_info lynx_info_lx2162a_serdes1 = { + .get_pccr = lynx_28g_get_pccr, + .get_pcvt_offset = lynx_28g_get_pcvt_offset, + .lane_supports_mode = lx2162a_serdes1_lane_supports_mode, + .first_lane = 4, + .num_lanes = LYNX_28G_NUM_LANE, +}; + +static const struct lynx_info lynx_info_lx2162a_serdes2 = { + .get_pccr = lynx_28g_get_pccr, + .get_pcvt_offset = lynx_28g_get_pcvt_offset, + .lane_supports_mode = lx2162a_serdes2_lane_supports_mode, + .num_lanes = LYNX_28G_NUM_LANE, +}; + static int lynx_28g_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev;