Commit 67fde761 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'apply-patches-from-gwen' into 'master'

software/spi-ocores/drivers/spi/spi-ocores: fix build with kernel >= 5.13.0

See merge request !42
parents a461491a 45e37836
......@@ -6,6 +6,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
......@@ -404,8 +405,13 @@ static int spi_ocores_hw_xfer_wait_complete(struct spi_ocores *sp,
*/
static int spi_ocores_sw_xfer_finish(struct spi_ocores *sp)
{
#if KERNEL_VERSION(5,13,0) <= LINUX_VERSION_CODE
if (sp->cur_xfer->delay.value)
udelay(sp->cur_xfer->delay.value);
#else
if (sp->cur_xfer->delay_usecs)
udelay(sp->cur_xfer->delay_usecs);
#endif
if (sp->cur_xfer->cs_change) {
unsigned int cs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment