Browse Source

Documentation: minor typo fix in mailbox.txt

Fix minor typo so that can pass correct pointer variable for
container_of().

Signed-off-by: Leo Yan <leo.yan@linaro.org>
[jc: tweaked formatting]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Leo Yan 10 years ago
parent
commit
7bbac697e4
1 changed files with 2 additions and 4 deletions
  1. 2 4
      Documentation/mailbox.txt

+ 2 - 4
Documentation/mailbox.txt

@@ -51,8 +51,7 @@ struct demo_client {
  */
  */
 static void message_from_remote(struct mbox_client *cl, void *mssg)
 static void message_from_remote(struct mbox_client *cl, void *mssg)
 {
 {
-	struct demo_client *dc = container_of(mbox_client,
-						struct demo_client, cl);
+	struct demo_client *dc = container_of(cl, struct demo_client, cl);
 	if (dc->async) {
 	if (dc->async) {
 		if (is_an_ack(mssg)) {
 		if (is_an_ack(mssg)) {
 			/* An ACK to our last sample sent */
 			/* An ACK to our last sample sent */
@@ -68,8 +67,7 @@ static void message_from_remote(struct mbox_client *cl, void *mssg)
 
 
 static void sample_sent(struct mbox_client *cl, void *mssg, int r)
 static void sample_sent(struct mbox_client *cl, void *mssg, int r)
 {
 {
-	struct demo_client *dc = container_of(mbox_client,
-						struct demo_client, cl);
+	struct demo_client *dc = container_of(cl, struct demo_client, cl);
 	complete(&dc->c);
 	complete(&dc->c);
 }
 }