mirror of
https://github.com/aleksamagicka/aquacomputer_d5next-hwmon.git
synced 2025-07-23 04:03:00 +02:00
Fix unaligned.h header for good
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
This commit is contained in:
2
.github/workflows/compile-driver.yaml
vendored
2
.github/workflows/compile-driver.yaml
vendored
@@ -13,7 +13,7 @@
|
||||
with:
|
||||
repository: torvalds/linux
|
||||
path: ./linux
|
||||
ref: v6.4
|
||||
ref: v6.12
|
||||
- name: install libelf-dev
|
||||
run: |
|
||||
sudo apt update
|
||||
|
@@ -132,10 +132,6 @@ available! Refer to the table in the overview above to check.
|
||||
|
||||
If you're not, or your kernel does not have the driver support for your particular device, you can compile it yourself.
|
||||
|
||||
### Kernel 6.12 or later
|
||||
|
||||
The `asm/unaligned.h` include is moved to `linux/unaligned.h`. Modify it to get it to compile on ealier versions.
|
||||
|
||||
### Kernel 5.18 and later
|
||||
|
||||
The driver uses some features only available in kernel 5.18 and later. You can check your kernel version by running:
|
||||
|
@@ -12,6 +12,14 @@
|
||||
* Copyright 2022 Jack Doan <me@jackdoan.com>
|
||||
*/
|
||||
|
||||
#include <generated/uapi/linux/version.h>
|
||||
|
||||
#if KERNEL_VERSION(6, 12, 0) <= LINUX_VERSION_CODE
|
||||
#include <linux/unaligned.h>
|
||||
#else
|
||||
#include <asm/unaligned.h>
|
||||
#endif
|
||||
|
||||
#include <linux/crc16.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -24,7 +32,6 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
||||
#define USB_VENDOR_ID_AQUACOMPUTER 0x0c70
|
||||
#define USB_PRODUCT_ID_AQUAERO 0xf001
|
||||
|
Reference in New Issue
Block a user