Merge tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson...
[sfrench/cifs-2.6.git] / samples / rpmsg / rpmsg_client_sample.c
index 2a0695573b47c782421340ee8a49963d731a3c13..ae50816622839141245cc6d8e2c42a4f183402af 100644 (file)
@@ -14,7 +14,9 @@
 #include <linux/rpmsg.h>
 
 #define MSG            "hello world!"
-#define MSG_LIMIT      100
+
+static int count = 100;
+module_param(count, int, 0644);
 
 struct instance_data {
        int rx_count;
@@ -29,11 +31,11 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len,
        dev_info(&rpdev->dev, "incoming msg %d (src: 0x%x)\n",
                 ++idata->rx_count, src);
 
-       print_hex_dump(KERN_DEBUG, __func__, DUMP_PREFIX_NONE, 16, 1,
-                      data, len,  true);
+       print_hex_dump_debug(__func__, DUMP_PREFIX_NONE, 16, 1, data, len,
+                            true);
 
        /* samples should not live forever */
-       if (idata->rx_count >= MSG_LIMIT) {
+       if (idata->rx_count >= count) {
                dev_info(&rpdev->dev, "goodbye!\n");
                return 0;
        }