]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
phy: lynx-28g: move struct lynx_info definitions downwards
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 10 Jun 2026 15:19:44 +0000 (18:19 +0300)
committerVinod Koul <vkoul@kernel.org>
Thu, 11 Jun 2026 07:09:46 +0000 (12:39 +0530)
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 <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260610151952.2141019-9-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/freescale/phy-fsl-lynx-28g.c

index 1de663283fafcb989e6321f4409a318cc71c8671..a3fbd31d4dbfe1db30bf6d24f48807b8a27ec1e0 100644 (file)
@@ -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;