phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE
Subsystems (2)
PATCH 1/1 phy: qcom-uniphy: avoid build failure from duplicate PHY_TYPE_PCIE
From: Arnd Bergmann <[email protected]>
Both the DT-binding and the driver define a PHY_TYPE_PCIE constant, which clashes at compile time:
In file included from include/linux/phy/phy.h:25,
from drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:15:include/dt-bindings/phy/phy.h:15:33: error: expected identifier before numeric constant
15 | #define PHY_TYPE_PCIE 2
| ^
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:47:9: note: in expansion of macro 'PHY_TYPE_PCIE'
47 | PHY_TYPE_PCIE = 1,
| ^~~~~~~~~~~~~
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:127:27: error: 'PHY_TYPE_PCIE_GEN2' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
127 | .phy_type = PHY_TYPE_PCIE_GEN2,
| ^~~~~~~~~~~~~~~~~~
| PHY_TYPE_PCIE
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c:135:27: error: 'PHY_TYPE_PCIE_GEN3' undeclared here (not in a function); did you mean 'PHY_TYPE_PCIE'?
135 | .phy_type = PHY_TYPE_PCIE_GEN3,
| ^~~~~~~~~~~~~~~~~~
| PHY_TYPE_PCIENothing uses the definition in the driver, so just remove it.
Fixes b28eecc89399 ("include: linux: phy: Add phy attribute "type" and associated helpers")
Signed-off-by Arnd Bergmann <[email protected]>
--- drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c +0 -9
@@ -43,12 +43,6 @@#define PHY_CFG_EIOS_DTCT_REG 0x3e4#define PHY_CFG_GEN3_ALIGN_HOLDOFF_TIME 0x3e8 -enum qcom_uniphy_pcie_type { -PHY_TYPE_PCIE =1 , -PHY_TYPE_PCIE_GEN2 , -PHY_TYPE_PCIE_GEN3 , -}; -struct qcom_uniphy_pcie_regs {u32 offset;u32 val;
@@ -56,7 +50,6 @@ struct qcom_uniphy_pcie_regs {struct qcom_uniphy_pcie_data {int lane_offset;/* offset between the lane register bases */ -u32 phy_type;const struct qcom_uniphy_pcie_regs *init_seq;u32 init_seq_num;u32 pipe_clk_rate;
@@ -124,7 +117,6 @@ static const struct qcom_uniphy_pcie_regs ipq5332_regs[] = {static const struct qcom_uniphy_pcie_data ipq5018_data = { .lane_offset =0x800 , - .phy_type =PHY_TYPE_PCIE_GEN2 , .init_seq = ipq5018_regs, .init_seq_num =ARRAY_SIZE (ipq5018_regs), .pipe_clk_rate =125 *MEGA ,
@@ -132,7 +124,6 @@ static const struct qcom_uniphy_pcie_data ipq5018_data = {static const struct qcom_uniphy_pcie_data ipq5332_data = { .lane_offset =0x800 , - .phy_type =PHY_TYPE_PCIE_GEN3 , .init_seq = ipq5332_regs, .init_seq_num =ARRAY_SIZE (ipq5332_regs), .pipe_clk_rate =250 *MEGA ,
Signature · 1 line
2.53.0