linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] m68k: compile fix - ADBREQ_RAW missing declaration
@ 2005-12-15  8:55 Al Viro
  2005-12-15 12:00 ` Roman Zippel
  0 siblings, 1 reply; 14+ messages in thread
From: Al Viro @ 2005-12-15  8:55 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-m68k

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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-12-25  2:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-15  8:55 [PATCH 2/3] m68k: compile fix - ADBREQ_RAW missing declaration Al Viro
2005-12-15 12:00 ` 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

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).