Merge pull request #228538 from parthy/fix-ax99100-linux-6-2

linuxPackages.ax99100: fix build with Linux >= 6.2
This commit is contained in:
Lassulus 2023-05-02 14:41:10 +02:00 committed by GitHub
commit 6d17be1750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));
}