Skip to content

Commit c7d8220

Browse files
committed
[drivers/spi]修复spi configure会执行两次的问题
1 parent a63b97e commit c7d8220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/drivers/spi/dev_spi_core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ rt_err_t rt_spi_bus_configure(struct rt_spi_device *device)
140140
result = rt_mutex_take(&(device->bus->lock), RT_WAITING_FOREVER);
141141
if (result == RT_EOK)
142142
{
143-
if (device->bus->owner == RT_NULL || device->bus->owner == device)
143+
if (device->bus->owner == device)
144144
{
145145
/* current device is using, re-configure SPI bus */
146146
result = device->bus->ops->configure(device, &device->config);

0 commit comments

Comments
 (0)