From cf0f1a0480d39f4593fc4f85cecf7af2aceb1a05 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 7 Feb 2014 22:53:31 +0100 Subject: [PATCH] backports: remove bluetooth HIDP transport-driver functions The function pointer raw_request and output_report in struct hid_ll_driver will be added with kernel 3.15, remove useage on older kernel versions. Signed-off-by: Hauke Mehrtens --- .../net_bluetooth_hidp_core.patch | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 patches/collateral-evolutions/network/85-hid_ll_driver/net_bluetooth_hidp_core.patch diff --git a/patches/collateral-evolutions/network/85-hid_ll_driver/net_bluetooth_hidp_core.patch b/patches/collateral-evolutions/network/85-hid_ll_driver/net_bluetooth_hidp_core.patch new file mode 100644 index 000000000000..81d742b2d248 --- /dev/null +++ b/patches/collateral-evolutions/network/85-hid_ll_driver/net_bluetooth_hidp_core.patch @@ -0,0 +1,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, + }; + -- 2.30.2