Skip to content

Commit f1b1eb0

Browse files
committed
drivers: i3c: shell: fix compilation error in cmd_i3c_ccc_getmxds
Resolved a compilation error where `maxwr`, `maxrd`, and `max_read_turnaround` were incorrectly referenced. The code was updated to correctly access these fields from the `data_speed` structure. Signed-off-by: Pisit Sawangvonganan <[email protected]>
1 parent b211e1b commit f1b1eb0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/i3c/i3c_shell.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,19 +1714,19 @@ static int cmd_i3c_ccc_getmxds(const struct shell *shell_ctx, size_t argc, char
17141714
mxds.fmt3.wrrdturn[0], mxds.fmt3.wrrdturn[1],
17151715
sys_get_le24(&mxds.fmt3.wrrdturn[2]));
17161716
/* Update values in descriptor */
1717-
desc->maxwr = mxds.fmt3.wrrdturn[0];
1718-
desc->maxrd = mxds.fmt3.wrrdturn[1];
1719-
desc->max_read_turnaround = sys_get_le24(&mxds.fmt3.wrrdturn[2]);
1717+
desc->data_speed.maxwr = mxds.fmt3.wrrdturn[0];
1718+
desc->data_speed.maxrd = mxds.fmt3.wrrdturn[1];
1719+
desc->data_speed.max_read_turnaround = sys_get_le24(&mxds.fmt3.wrrdturn[2]);
17201720
} else if (defbyte == GETMXDS_FORMAT_3_CRHDLY) {
17211721
shell_print(shell_ctx, "CRHDLY1: 0x%02x", mxds.fmt3.crhdly1);
17221722
}
17231723
} else {
17241724
shell_print(shell_ctx, "GETMXDS: maxwr 0x%02x; maxrd 0x%02x; maxrdturn 0x%06x",
17251725
mxds.fmt2.maxwr, mxds.fmt2.maxrd, sys_get_le24(mxds.fmt2.maxrdturn));
17261726
/* Update values in descriptor */
1727-
desc->maxwr = mxds.fmt2.maxwr;
1728-
desc->maxrd = mxds.fmt2.maxrd;
1729-
desc->max_read_turnaround = sys_get_le24(mxds.fmt2.maxrdturn);
1727+
desc->data_speed.maxwr = mxds.fmt2.maxwr;
1728+
desc->data_speed.maxrd = mxds.fmt2.maxrd;
1729+
desc->data_speed.max_read_turnaround = sys_get_le24(mxds.fmt2.maxrdturn);
17301730
}
17311731

17321732
return ret;

0 commit comments

Comments
 (0)