aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-26 19:17:19 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-26 19:17:19 -0800
commitf4d53cedce872fe1439818d15e067b497b5d466f (patch)
treeb6942135c8a4235cb409a833d736307eaecdbc90 /Documentation
parent9bb9f2220e6d904f60f9f72209b5313d0808f0c2 (diff)
parent8329d98e480250ef5f5a083f9c3af50510b5e65d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio: fix net driver loop case where we fail to restart module: fix and elaborate comments virtio: fix module/device unloading lguest: Fix uninitialized members in example launcher
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/lguest/lguest.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 42008395534..9b0e322118b 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1040,6 +1040,11 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
/ getpagesize();
p = get_pages(pages);
+ /* Initialize the virtqueue */
+ vq->next = NULL;
+ vq->last_avail_idx = 0;
+ vq->dev = dev;
+
/* Initialize the configuration. */
vq->config.num = num_descs;
vq->config.irq = devices.next_irq++;
@@ -1057,9 +1062,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
for (i = &dev->vq; *i; i = &(*i)->next);
*i = vq;
- /* Link virtqueue back to device. */
- vq->dev = dev;
-
/* Set the routine to call when the Guest does something to this
* virtqueue. */
vq->handle_output = handle_output;
@@ -1093,6 +1095,7 @@ static struct device *new_device(const char *name, u16 type, int fd,
dev->desc = new_dev_desc(type);
dev->handle_input = handle_input;
dev->name = name;
+ dev->vq = NULL;
return dev;
}