Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hid-kye.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <linux/hid.h>
#include <linux/module.h>

#include <linux/version.h>

#include "hid-ids.h"

/* Original EasyPen i405X report descriptor size */
Expand Down Expand Up @@ -579,8 +581,13 @@ static __u8 *kye_consumer_control_fixup(struct hid_device *hdev, __u8 *rdesc,
return rdesc;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#else
static const __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#endif
{
switch (hdev->product) {
case USB_DEVICE_ID_KYE_ERGO_525V:
Expand Down
6 changes: 6 additions & 0 deletions hid-polostar.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/version.h>

#include "hid-ids.h"

Expand Down Expand Up @@ -149,8 +150,13 @@ static __u8 pt1001_rdesc_fixed[] = {
0xC0, /* End Collection */
};

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
static __u8 *polostar_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#else
static const __u8 *polostar_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#endif
{
struct usb_interface *iface = to_usb_interface(hdev->dev.parent);
__u8 iface_num = iface->cur_altsetting->desc.bInterfaceNumber;
Expand Down
5 changes: 5 additions & 0 deletions hid-uclogic-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ static void uclogic_inrange_timeout(struct timer_list *t)
input_sync(input);
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
static __u8 *uclogic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#else
static const __u8 *uclogic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#endif
{
struct uclogic_drvdata *drvdata = hid_get_drvdata(hdev);

Expand Down
7 changes: 6 additions & 1 deletion hid-uclogic-params.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@
#include "hid-ids.h"
#include <linux/ctype.h>
#include <linux/string.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 <linux/version.h>

/**
* uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
Expand Down
6 changes: 6 additions & 0 deletions hid-uclogic-rdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@

#include "hid-uclogic-rdesc.h"
#include <linux/slab.h>
#include <linux/version.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif

/* Fixed WP4030U report descriptor */
__u8 uclogic_rdesc_wp4030u_fixed_arr[] = {
Expand Down
6 changes: 6 additions & 0 deletions hid-viewsonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/version.h>

#include "hid-ids.h"

Expand Down Expand Up @@ -71,8 +72,13 @@ static __u8 pd1011_rdesc_fixed[] = {
0xC0 /* End Collection */
};

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
static __u8 *viewsonic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#else
static const __u8 *viewsonic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
#endif
{
switch (hdev->product) {
case USB_DEVICE_ID_VIEWSONIC_PD1011:
Expand Down