Преглед на файлове

qcacmn: Add return as int for qdf hrtimer cancel

Add return value as int to check the success and failure of hrtimer cancel.

CRs-Fixed: 2292414
Change-Id: I7bfe94882551533c3f6b4164a2a3f778216b281b
Alok Singh преди 6 години
родител
ревизия
18fcc5548a
променени са 2 файла, в които са добавени 9 реда и са изтрити 7 реда
  1. 3 3
      qdf/inc/qdf_hrtimer.h
  2. 6 4
      qdf/linux/src/i_qdf_hrtimer.h

+ 3 - 3
qdf/inc/qdf_hrtimer.h

@@ -58,12 +58,12 @@ void qdf_hrtimer_start(qdf_hrtimer_data_t *timer, qdf_ktime_t interval,
  *
  * Cancels hrtimer in given context
  *
- * Return: void
+ * Return: int
  */
 static inline
-void qdf_hrtimer_cancel(qdf_hrtimer_data_t *timer)
+int qdf_hrtimer_cancel(qdf_hrtimer_data_t *timer)
 {
-	__qdf_hrtimer_cancel(timer);
+	return __qdf_hrtimer_cancel(timer);
 }
 
 /**

+ 6 - 4
qdf/linux/src/i_qdf_hrtimer.h

@@ -66,15 +66,17 @@ void __qdf_hrtimer_start(__qdf_hrtimer_data_t *timer, ktime_t interval,
  *
  * cancels hrtimer in given context
  *
- * Return: void
+ * Return: int
  */
 static inline
-void __qdf_hrtimer_cancel(__qdf_hrtimer_data_t *timer)
+int __qdf_hrtimer_cancel(__qdf_hrtimer_data_t *timer)
 {
 	if (timer->ctx == QDF_CONTEXT_HARDWARE)
-		hrtimer_cancel(&timer->u.hrtimer);
+		return hrtimer_cancel(&timer->u.hrtimer);
 	else if (timer->ctx == QDF_CONTEXT_TASKLET)
-		hrtimer_cancel(&timer->u.tasklet_hrtimer.timer);
+		return hrtimer_cancel(&timer->u.tasklet_hrtimer.timer);
+
+	return 0;
 }
 
 /**