summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/rpmsg/rpmsg_client_sample.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c
index b9a99e621a5c..ae5081662283 100644
--- a/samples/rpmsg/rpmsg_client_sample.c
+++ b/samples/rpmsg/rpmsg_client_sample.c
@@ -14,7 +14,9 @@
14#include <linux/rpmsg.h> 14#include <linux/rpmsg.h>
15 15
16#define MSG "hello world!" 16#define MSG "hello world!"
17#define MSG_LIMIT 100 17
18static int count = 100;
19module_param(count, int, 0644);
18 20
19struct instance_data { 21struct instance_data {
20 int rx_count; 22 int rx_count;
@@ -33,7 +35,7 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len,
33 true); 35 true);
34 36
35 /* samples should not live forever */ 37 /* samples should not live forever */
36 if (idata->rx_count >= MSG_LIMIT) { 38 if (idata->rx_count >= count) {
37 dev_info(&rpdev->dev, "goodbye!\n"); 39 dev_info(&rpdev->dev, "goodbye!\n");
38 return 0; 40 return 0;
39 } 41 }