mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
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 530560b6f8
("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
This commit is contained in:
parent
0f259fe79d
commit
93216276f5
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue