Skip to content

Commit d72f6e2

Browse files
Jiasheng Jianggregkh
authored andcommitted
ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop
[ Upstream commit a767957 ] In ptp_ocp_sma_fb_init(), the code mistakenly used bp->sma[1] instead of bp->sma[i] inside a for-loop, which caused only SMA[1] to have its DIRECTION_CAN_CHANGE capability cleared. This led to inconsistent capability flags across SMA pins. Fixes: 09eeb3a ("ptp_ocp: implement DPLL ops") Signed-off-by: Jiasheng Jiang <[email protected]> Reviewed-by: Vadim Fedorenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent cb97426 commit d72f6e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ptp/ptp_ocp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,7 @@ ptp_ocp_sma_fb_init(struct ptp_ocp *bp)
25462546
for (i = 0; i < OCP_SMA_NUM; i++) {
25472547
bp->sma[i].fixed_fcn = true;
25482548
bp->sma[i].fixed_dir = true;
2549-
bp->sma[1].dpll_prop.capabilities &=
2549+
bp->sma[i].dpll_prop.capabilities &=
25502550
~DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE;
25512551
}
25522552
return;

0 commit comments

Comments
 (0)