From: Uwe Kleine-König Date: Thu, 1 Aug 2019 20:47:10 +0000 (+0200) Subject: spi: atmel: add tracing to custom .transfer_one_message callback X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3c0448d507d42605ab6811bcd61c1cd94390d2d8;p=openwrt%2Fstaging%2Fblogic.git spi: atmel: add tracing to custom .transfer_one_message callback Driver specific implementations for .transfer_one_message need to call the tracing stuff themself. This is necessary to make spi tracing actually useful. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20190801204710.27309-1-uwe@kleine-koenig.org Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index f00b367523cd..acf318e7330c 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -23,6 +23,7 @@ #include #include #include +#include /* SPI register offsets */ #define SPI_CR 0x0000 @@ -1409,9 +1410,13 @@ static int atmel_spi_transfer_one_message(struct spi_master *master, msg->actual_length = 0; list_for_each_entry(xfer, &msg->transfers, transfer_list) { + trace_spi_transfer_start(msg, xfer); + ret = atmel_spi_one_transfer(master, msg, xfer); if (ret) goto msg_done; + + trace_spi_transfer_stop(msg, xfer); } if (as->use_pdc)