linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org
Subject: [PATCH 2/3] m68k: compile fix - ADBREQ_RAW missing declaration
Date: Thu, 15 Dec 2005 08:55:16 +0000	[thread overview]
Message-ID: <20051215085516.GU27946@ftp.linux.org.uk> (raw)

another compile fix, pulled straight from m68k CVS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---

 drivers/macintosh/adb.c |    8 +++++---
 include/linux/adb.h     |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

d39fe026c456804272741a7c62ae380257e9a879
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index d2ead17..6b7591e 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -476,13 +476,15 @@ adb_request(struct adb_request *req, voi
 		use_sreq = 1;
 	} else
 		use_sreq = 0;
-	req->nbytes = nbytes+1;
+	i = (flags & ADBREQ_RAW) ? 0 : 1;
+	req->nbytes = nbytes+i;
 	req->done = done;
 	req->reply_expected = flags & ADBREQ_REPLY;
 	req->data[0] = ADB_PACKET;
 	va_start(list, nbytes);
-	for (i = 0; i < nbytes; ++i)
-		req->data[i+1] = va_arg(list, int);
+	while (i < req->nbytes) {
+		req->data[i++] = va_arg(list, int);
+	}
 	va_end(list);
 
 	if (flags & ADBREQ_NOSEND)
diff --git a/include/linux/adb.h b/include/linux/adb.h
index e9fdc63..aad7b1c 100644
--- a/include/linux/adb.h
+++ b/include/linux/adb.h
@@ -76,6 +76,7 @@ struct adb_driver {
 #define ADBREQ_REPLY	1	/* expect reply */
 #define ADBREQ_SYNC	2	/* poll until done */
 #define ADBREQ_NOSEND	4	/* build the request, but don't send it */
+#define ADBREQ_RAW	8	/* send raw packet (don't prepend ADB_PACKET) */
 
 /* Messages sent thru the client_list notifier. You should NOT stop
    the operation, at least not with this version */
-- 
0.99.9.GIT


             reply	other threads:[~2005-12-15  8:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-15  8:55 Al Viro [this message]
2005-12-15 12:00 ` [PATCH 2/3] m68k: compile fix - ADBREQ_RAW missing declaration Roman Zippel
2005-12-15 17:16   ` Al Viro
2005-12-15 17:47     ` Al Viro
2005-12-15 17:54       ` Geert Uytterhoeven
2005-12-16  1:21       ` Finn Thain
2005-12-15 17:51     ` Roman Zippel
2005-12-15 17:55       ` Al Viro
2005-12-15 18:00         ` Geert Uytterhoeven
2005-12-15 18:14           ` Al Viro
2005-12-15 18:58             ` Al Viro
2005-12-15 20:05               ` Brad Boyer
2005-12-22  5:06                 ` Al Viro
2005-12-25  2:26                   ` Brad Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051215085516.GU27946@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).