1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -355,6 +355,7 @@ err:
}
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
static int hidp_set_raw_report(struct hid_device *hid, unsigned char reportnum,
unsigned char *data, size_t count,
unsigned char report_type)
@@ -419,6 +420,7 @@ err:
mutex_unlock(&session->report_mutex);
return ret;
}
+#endif
#if defined(CPTCFG_BACKPORT_OPTION_BT_SOCK_CREATE_NEEDS_KERN)
static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
@@ -489,6 +491,7 @@ static int hidp_output_raw_report(struct
}
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum,
__u8 *buf, size_t len, unsigned char rtype,
int reqtype)
@@ -502,7 +505,9 @@ static int hidp_raw_request(struct hid_d
return -EIO;
}
}
+#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count)
{
struct hidp_session *session = hid->driver_data;
@@ -511,6 +516,7 @@ static int hidp_output_report(struct hid
HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT,
data, count);
}
+#endif
static void hidp_idle_timeout(unsigned long arg)
{
@@ -909,8 +915,10 @@ static struct hid_ll_driver hidp_hid_dri
.stop = hidp_stop,
.open = hidp_open,
.close = hidp_close,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
.raw_request = hidp_raw_request,
.output_report = hidp_output_report,
+#endif
.hidinput_input_event = hidp_hidinput_event,
};
|