Skip to content

Commit

Permalink
Fix for Linux 5.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianValente committed Jun 3, 2022
1 parent 30d7fb1 commit 2905d31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions applespi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,11 @@ static void applespi_drain_reads(struct applespi_data *applespi)
spin_unlock_irqrestore(&applespi->cmd_msg_lock, flags);
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 1)
static void applespi_remove(struct spi_device *spi)
#else
static int applespi_remove(struct spi_device *spi)
#endif
{
struct applespi_data *applespi = spi_get_drvdata(spi);

Expand All @@ -2139,7 +2143,9 @@ static int applespi_remove(struct spi_device *spi)

debugfs_remove_recursive(applespi->debugfs_root);

#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 1)
return 0;
#endif
}

static void applespi_shutdown(struct spi_device *spi)
Expand Down

0 comments on commit 2905d31

Please sign in to comment.