Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

samples/rpmsg: Introduce a module parameter for message count

The current rpmsg_client_sample uses a fixed number of messages to
be sent to each instance. This is currently set at 100. Introduce
an optional module parameter 'count' so that the number of messages
to be exchanged can be made flexible.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

authored by

Suman Anna and committed by
Bjorn Andersson
9a703eb7 2519fbb3

+4 -2
+4 -2
samples/rpmsg/rpmsg_client_sample.c
··· 14 14 #include <linux/rpmsg.h> 15 15 16 16 #define MSG "hello world!" 17 - #define MSG_LIMIT 100 17 + 18 + static int count = 100; 19 + module_param(count, int, 0644); 18 20 19 21 struct instance_data { 20 22 int rx_count; ··· 35 33 true); 36 34 37 35 /* samples should not live forever */ 38 - if (idata->rx_count >= MSG_LIMIT) { 36 + if (idata->rx_count >= count) { 39 37 dev_info(&rpdev->dev, "goodbye!\n"); 40 38 return 0; 41 39 }