diff mbox series

[bionic,09/10] UBUNTU: SAUCE: ubuntu/rtl8821c-bt: Adapt to timer API changes

Message ID 20180323164707.6027-10-jesse.sung@canonical.com
State New
Headers show
Series Add drivers for RTL8821C WiFi and BT | expand

Commit Message

Wen-chien Jesse Sung March 23, 2018, 4:47 p.m. UTC
BugLink: https://launchpad.net/bugs/1742613

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 ubuntu/rtl8821c-bt/rtk_coex.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/ubuntu/rtl8821c-bt/rtk_coex.c b/ubuntu/rtl8821c-bt/rtk_coex.c
index 547deb8d8b92..5fc95194d043 100644
--- a/ubuntu/rtl8821c-bt/rtk_coex.c
+++ b/ubuntu/rtl8821c-bt/rtk_coex.c
@@ -65,9 +65,9 @@  static struct rtl_coex_struct btrtl_coex;
 #define is_profile_busy(profile)        ((btrtl_coex.profile_status & BIT(profile)) > 0)
 
 static void rtk_handle_event_from_wifi(uint8_t * msg);
-static void count_a2dp_packet_timeout(unsigned long data);
-static void count_pan_packet_timeout(unsigned long data);
-static void count_hogp_packet_timeout(unsigned long data);
+static void count_a2dp_packet_timeout(struct timer_list *data);
+static void count_pan_packet_timeout(struct timer_list *data);
+static void count_hogp_packet_timeout(struct timer_list *data);
 
 static int rtl_alloc_buff(struct rtl_coex_struct *coex)
 {
@@ -562,7 +562,7 @@  static void rtk_check_setup_timer(int8_t profile_index)
 {
 	if (profile_index == profile_a2dp) {
 		btrtl_coex.a2dp_packet_count = 0;
-		setup_timer(&(btrtl_coex.a2dp_count_timer),
+		timer_setup(&(btrtl_coex.a2dp_count_timer),
 			    count_a2dp_packet_timeout, 0);
 		btrtl_coex.a2dp_count_timer.expires =
 		    jiffies + msecs_to_jiffies(1000);
@@ -571,7 +571,7 @@  static void rtk_check_setup_timer(int8_t profile_index)
 
 	if (profile_index == profile_pan) {
 		btrtl_coex.pan_packet_count = 0;
-		setup_timer(&(btrtl_coex.pan_count_timer),
+		timer_setup(&(btrtl_coex.pan_count_timer),
 			    count_pan_packet_timeout, 0);
 		btrtl_coex.pan_count_timer.expires =
 		    jiffies + msecs_to_jiffies(1000);
@@ -584,7 +584,7 @@  static void rtk_check_setup_timer(int8_t profile_index)
 		    && (0 == btrtl_coex.profile_refcount[profile_voice])) {
 			btrtl_coex.hogp_packet_count = 0;
 			btrtl_coex.voice_packet_count = 0;
-			setup_timer(&(btrtl_coex.hogp_count_timer),
+			timer_setup(&(btrtl_coex.hogp_count_timer),
 				    count_hogp_packet_timeout, 0);
 			btrtl_coex.hogp_count_timer.expires =
 			    jiffies + msecs_to_jiffies(1000);
@@ -975,7 +975,7 @@  static void packets_count(uint16_t handle, uint16_t scid, uint16_t length,
 	}
 }
 
-static void count_a2dp_packet_timeout(unsigned long data)
+static void count_a2dp_packet_timeout(struct timer_list *data)
 {
 	RTKBT_DBG("%s: a2dp_packet_count %d", __func__,
 			btrtl_coex.a2dp_packet_count);
@@ -992,7 +992,7 @@  static void count_a2dp_packet_timeout(unsigned long data)
 		  jiffies + msecs_to_jiffies(1000));
 }
 
-static void count_pan_packet_timeout(unsigned long data)
+static void count_pan_packet_timeout(struct timer_list *data)
 {
 	RTKBT_DBG("%s: pan_packet_count %d", __func__,
 			btrtl_coex.pan_packet_count);
@@ -1012,7 +1012,7 @@  static void count_pan_packet_timeout(unsigned long data)
 		  jiffies + msecs_to_jiffies(1000));
 }
 
-static void count_hogp_packet_timeout(unsigned long data)
+static void count_hogp_packet_timeout(struct timer_list *data)
 {
 	RTKBT_DBG("%s: hogp_packet_count %d", __func__,
 			btrtl_coex.hogp_packet_count);
@@ -2320,7 +2320,7 @@  void rtk_btcoex_parse_l2cap_data_rx(uint8_t *buffer, int count)
 	//}
 }
 
-static void polling_bt_info(unsigned long data)
+static void polling_bt_info(struct timer_list *data)
 {
 	uint8_t temp_cmd[1];
 	RTKBT_DBG("polling timer");
@@ -2346,7 +2346,7 @@  static void rtk_handle_bt_info_control(uint8_t *p)
 
 	if (ctl->polling_enable && !btrtl_coex.polling_enable) {
 		/* setup polling timer for getting bt info from firmware */
-		setup_timer(&(btrtl_coex.polling_timer), polling_bt_info, 0);
+		timer_setup(&(btrtl_coex.polling_timer), polling_bt_info, 0);
 		btrtl_coex.polling_timer.expires =
 		    jiffies + msecs_to_jiffies(ctl->polling_time * 1000);
 		add_timer(&(btrtl_coex.polling_timer));
@@ -2562,10 +2562,10 @@  void rtk_btcoex_open(struct hci_dev *hdev)
 			  (void *)udpsocket_recv_data);
 	INIT_DELAYED_WORK(&btrtl_coex.l2_work, (void *)rtl_l2_work);
 
-	init_timer(&btrtl_coex.polling_timer);
-	init_timer(&btrtl_coex.a2dp_count_timer);
-	init_timer(&btrtl_coex.pan_count_timer);
-	init_timer(&btrtl_coex.hogp_count_timer);
+	timer_setup(&btrtl_coex.polling_timer, NULL, 0);
+	timer_setup(&btrtl_coex.a2dp_count_timer, NULL, 0);
+	timer_setup(&btrtl_coex.pan_count_timer, NULL, 0);
+	timer_setup(&btrtl_coex.hogp_count_timer, NULL, 0);
 
 	btrtl_coex.hdev = hdev;
 	btrtl_coex.wifi_on = 0;