[PATCH 03/11] android/tester-ng: Improve callback defining makro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This makes CALLBACK_DEVICE_PROPS and CALLBACK_DEVICE_FOUND use more
generic CALLBACK_PROPS makro.
---
 android/tester-main.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/android/tester-main.h b/android/tester-main.h
index a5ed5b1..883ec4d 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
@@ -87,17 +87,17 @@
 		.callback_result.num_properties = prop_cnt, \
 	}
 
-#define CALLBACK_DEVICE_PROPS(props, prop_cnt) { \
-		.callback = CB_BT_REMOTE_DEVICE_PROPERTIES, \
+#define CALLBACK_PROPS(cb, props, prop_cnt) { \
+		.callback = cb, \
 		.callback_result.properties = props, \
 		.callback_result.num_properties = prop_cnt, \
 	}
 
-#define CALLBACK_DEVICE_FOUND(props, prop_cnt) { \
-		.callback = CB_BT_DEVICE_FOUND, \
-		.callback_result.properties = props, \
-		.callback_result.num_properties = prop_cnt, \
-	}
+#define CALLBACK_DEVICE_PROPS(props, prop_cnt) \
+	CALLBACK_PROPS(CB_BT_REMOTE_DEVICE_PROPERTIES, props, prop_cnt)
+
+#define CALLBACK_DEVICE_FOUND(props, prop_cnt) \
+	CALLBACK_PROPS(CB_BT_DEVICE_FOUND, props, prop_cnt)
 
 /*
  * NOTICE:
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux