summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorGUI <[email protected]>2025-03-01 10:29:18 +0800
committerRbb666 <[email protected]>2025-03-01 12:03:32 +0800
commitfbb65196a72070c93a1bc4981ad3347bb73c4d90 (patch)
treebcb4bb273425027f985dbfc58cd438f91636d063 /components/drivers
parent8adae0725d9fa37665ad9b5d83359705b1a9bc8c (diff)
Fixup device rename by chip_select
`chip_select` is array now, should use index of value.
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/spi/dev_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/spi/dev_spi.c b/components/drivers/spi/dev_spi.c
index 3f55fd0eb0..e0cd5f3bef 100644
--- a/components/drivers/spi/dev_spi.c
+++ b/components/drivers/spi/dev_spi.c
@@ -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;
}