Skip to content

Commit 6350298

Browse files
committed
spi: sam: fix function and config naming
Incorrect naming prevents compilation. Change names: - CONFIG_xx_NAME -> DT_xx_NAME - spi_sam0_xx -> spi_sam_xx Signed-off-by: Bobby Noelte <[email protected]>
1 parent be75e68 commit 6350298

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/spi/spi_sam.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ static int spi_sam_transceive(struct device *dev,
395395
return err;
396396
}
397397

398-
static int spi_sam0_transceive_sync(struct device *dev,
398+
static int spi_sam_transceive_sync(struct device *dev,
399399
const struct spi_config *config,
400400
const struct spi_buf_set *tx_bufs,
401401
const struct spi_buf_set *rx_bufs)
402402
{
403-
struct spi_sam0_data *data = dev->driver_data;
403+
struct spi_sam_data *data = dev->driver_data;
404404

405405
spi_context_lock(&data->ctx, false, NULL);
406-
return spi_sam0_transceive(dev, config, tx_bufs, rx_bufs);
406+
return spi_sam_transceive(dev, config, tx_bufs, rx_bufs);
407407
}
408408

409409
#ifdef CONFIG_SPI_ASYNC
@@ -413,10 +413,10 @@ static int spi_sam_transceive_async(struct device *dev,
413413
const struct spi_buf_set *rx_bufs,
414414
struct k_poll_signal *async)
415415
{
416-
struct spi_sam0_data *data = dev->driver_data;
416+
struct spi_sam_data *data = dev->driver_data;
417417

418418
spi_context_lock(&data->ctx, true, async);
419-
return spi_sam0_transceive(dev, config, tx_bufs, rx_bufs);
419+
return spi_sam_transceive(dev, config, tx_bufs, rx_bufs);
420420
}
421421
#endif /* CONFIG_SPI_ASYNC */
422422

@@ -513,7 +513,7 @@ static const struct spi_driver_api spi_sam_driver_api = {
513513
SPI_CONTEXT_INIT_SYNC(spi_sam_dev_data_##n, ctx), \
514514
}; \
515515
DEVICE_AND_API_INIT(spi_sam_##n, \
516-
CONFIG_SPI_##n##_NAME, \
516+
DT_SPI_##n##_NAME, \
517517
&spi_sam_init, &spi_sam_dev_data_##n, \
518518
&spi_sam_config_##n, POST_KERNEL, \
519519
CONFIG_SPI_INIT_PRIORITY, &spi_sam_driver_api)

0 commit comments

Comments
 (0)