diff options
author | Michal Simek <michal.simek@amd.com> | 2022-06-06 09:31:27 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@amd.com> | 2022-06-06 09:32:26 +0200 |
commit | 93216276f532c9eed2126860a678a6b4d77dc358 (patch) | |
tree | 7dbaceddcd8a9d0cf1ef37e85a2c5e75edac31c2 /board | |
parent | 0f259fe79d7f0dca716bc954c211b0e6bc606d72 (diff) | |
download | u-boot-93216276f532c9eed2126860a678a6b4d77dc358.tar.gz u-boot-93216276f532c9eed2126860a678a6b4d77dc358.tar.bz2 u-boot-93216276f532c9eed2126860a678a6b4d77dc358.zip |
xilinx: fru: Replace spaces with \0 in detected revision
Also fix board revision field where spaces are used instead of \0.
The same change was done for board name by commit 530560b6f8eb ("xilinx:
fru: Replace spaces with \0 in detected name").
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e069e5134e57899e859786ad8ba48721df6df752.1653911444.git.michal.simek@amd.com
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/common/board.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 5be3090c31..629a6ee036 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -245,6 +245,10 @@ static int xilinx_read_eeprom_fru(struct udevice *dev, char *name, } strncpy(desc->revision, (char *)fru_data.brd.rev, sizeof(desc->revision)); + for (i = 0; i < sizeof(desc->revision); i++) { + if (desc->revision[i] == ' ') + desc->revision[i] = '\0'; + } strncpy(desc->serial, (char *)fru_data.brd.serial_number, sizeof(desc->serial)); |