Skip to content

Commit 7e6c2ff

Browse files
andredvinodkoul
authored andcommitted
phy: exynos5-usbdrd: convert some FIELD_PREP_CONST() to FIELD_PREP()
Use of FIELD_PREP_CONST() was a thinko - it's meant to be used for (constant) initialisers, not constant values. Use FIELD_PREP() where possible. It has better error checking and is therefore the preferred macro to use in those cases. Signed-off-by: André Draszik <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4bf8b46 commit 7e6c2ff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/phy/samsung/phy-exynos5-usbdrd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ exynos5_usbdrd_usbdp_g2_v4_ctrl_pma_ready(struct exynos5_usbdrd_phy *phy_drd)
607607

608608
reg = readl(regs_base + EXYNOS850_DRD_SECPMACTL);
609609
reg &= ~SECPMACTL_PMA_REF_FREQ_SEL;
610-
reg |= FIELD_PREP_CONST(SECPMACTL_PMA_REF_FREQ_SEL, 1);
610+
reg |= FIELD_PREP(SECPMACTL_PMA_REF_FREQ_SEL, 1);
611611
/* SFR reset */
612612
reg |= (SECPMACTL_PMA_LOW_PWR | SECPMACTL_PMA_APB_SW_RST);
613613
reg &= ~(SECPMACTL_PMA_ROPLL_REF_CLK_SEL |
@@ -1123,19 +1123,19 @@ static void exynos850_usbdrd_utmi_init(struct exynos5_usbdrd_phy *phy_drd)
11231123
reg &= ~SSPPLLCTL_FSEL;
11241124
switch (phy_drd->extrefclk) {
11251125
case EXYNOS5_FSEL_50MHZ:
1126-
reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 7);
1126+
reg |= FIELD_PREP(SSPPLLCTL_FSEL, 7);
11271127
break;
11281128
case EXYNOS5_FSEL_26MHZ:
1129-
reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 6);
1129+
reg |= FIELD_PREP(SSPPLLCTL_FSEL, 6);
11301130
break;
11311131
case EXYNOS5_FSEL_24MHZ:
1132-
reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 2);
1132+
reg |= FIELD_PREP(SSPPLLCTL_FSEL, 2);
11331133
break;
11341134
case EXYNOS5_FSEL_20MHZ:
1135-
reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 1);
1135+
reg |= FIELD_PREP(SSPPLLCTL_FSEL, 1);
11361136
break;
11371137
case EXYNOS5_FSEL_19MHZ2:
1138-
reg |= FIELD_PREP_CONST(SSPPLLCTL_FSEL, 0);
1138+
reg |= FIELD_PREP(SSPPLLCTL_FSEL, 0);
11391139
break;
11401140
default:
11411141
dev_warn(phy_drd->dev, "unsupported ref clk: %#.2x\n",

0 commit comments

Comments
 (0)