linuxPackages.ax99100: fix build with Linux >= 6.2

This commit is contained in:
Markus Partheymüller 2023-04-27 16:13:43 +02:00
parent 0837b221dc
commit 13836ea146
2 changed files with 14 additions and 1 deletions

View File

@ -26,7 +26,9 @@ stdenv.mkDerivation
patches = [
./kernel-5.18-pci_free_consistent-pci_alloc_consistent.patch
./kernel-6.1-set_termios-const-ktermios.patch
];
] ++ (lib.optional (lib.versionAtLeast kernel.version "6.2") [
./kernel-6.2-fix-pointer-type.patch
]);
patchFlags = [ "-p0" ];

View File

@ -0,0 +1,11 @@
--- ax99100_spi.c
+++ ax99100_spi.c
@@ -76,7 +76,7 @@ int spi_suspend_count;
static unsigned int spi_major = 241;
static unsigned int spi_min_count = 0;
/* device Class */
-static char *ax_devnode(struct device *dev, umode_t *mode)
+static char *ax_devnode(const struct device *dev, umode_t *mode)
{
return kasprintf(GFP_KERNEL, "%s", dev_name(dev));
}