Compare commits

...

3 Commits

Author SHA1 Message Date
ozz-is-here f114cb6cf0
Merge pull request #2 from Boria138/6.12
Fix build on linux 6.12 (closed #1)
10 months ago
Boris Yumankulov ac45a5ff86
Added post install and post remove to blacklist hid-sony 10 months ago
Boris Yumankulov 4fd793f8f3
Fix build on linux 6.12 (closed #1) 10 months ago

@ -5,3 +5,6 @@ CLEAN="make clean"
BUILT_MODULE_NAME[0]="hid-sony-fix-dkms"
DEST_MODULE_LOCATION[0]="/kernel/drivers/hid"
AUTOINSTALL="yes"
POST_INSTALL="dkms.post_install"
POST_REMOVE="dkms.post_remove"

@ -0,0 +1,4 @@
#!/bin/sh
echo "Installing modalias database..."
install -D -m 0644 -t /etc/modprobe.d etc-modprobe.d/hid-sony-blacklist.conf

@ -0,0 +1,4 @@
#!/bin/sh
echo "Uninstalling modalias database..."
rm -f /etc/modprobe.d/hid-sony-blacklist.conf

@ -40,7 +40,13 @@
#include <linux/crc32.h>
#include <linux/usb.h>
#include <linux/timer.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include "hid-ids.h"
@ -937,8 +943,12 @@ static int ds4_mapping(struct hid_device *hdev, struct hid_input *hi,
return 0;
}
static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,
unsigned int *rsize)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0)
static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc, unsigned int *rsize)
#else
static const __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize)
#endif
{
struct sony_sc *sc = hid_get_drvdata(hdev);

Loading…
Cancel
Save