Fixup device rename by chip_select

`chip_select` is array now, should use index of value.
This commit is contained in:
GUI 2025-03-01 10:29:18 +08:00 committed by Rbb666
parent 8adae0725d
commit fbb65196a7
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ static rt_err_t spidev_probe(struct rt_spi_device *spi_dev)
}
bus_name = rt_dm_dev_get_name(&spi_dev->bus->parent);
rt_dm_dev_set_name(dev, "%s_%d", bus_name, spi_dev->chip_select);
rt_dm_dev_set_name(dev, "%s_%d", bus_name, spi_dev->chip_select[0]);
return RT_EOK;
}