Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[cascardo/linux.git] / samples / rpmsg / rpmsg_client_sample.c
index 37975ed..f161dfd 100644 (file)
@@ -28,7 +28,7 @@ struct instance_data {
        int rx_count;
 };
 
-static void rpmsg_sample_cb(struct rpmsg_channel *rpdev, void *data, int len,
+static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len,
                                                void *priv, u32 src)
 {
        int ret;
@@ -43,16 +43,18 @@ static void rpmsg_sample_cb(struct rpmsg_channel *rpdev, void *data, int len,
        /* samples should not live forever */
        if (idata->rx_count >= MSG_LIMIT) {
                dev_info(&rpdev->dev, "goodbye!\n");
-               return;
+               return 0;
        }
 
        /* send a new message now */
        ret = rpmsg_send(rpdev->ept, MSG, strlen(MSG));
        if (ret)
                dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret);
+
+       return 0;
 }
 
-static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
+static int rpmsg_sample_probe(struct rpmsg_device *rpdev)
 {
        int ret;
        struct instance_data *idata;
@@ -76,7 +78,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
        return 0;
 }
 
-static void rpmsg_sample_remove(struct rpmsg_channel *rpdev)
+static void rpmsg_sample_remove(struct rpmsg_device *rpdev)
 {
        dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n");
 }